Skip to content

Commit adb1b87

Browse files
committed
fix for #699
1 parent 511d94d commit adb1b87

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

api.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -7954,7 +7954,7 @@ private function getCondition(string $tableName, array $pairs): Condition
79547954
private function getPairs($handler, string $operation, string $tableName): array
79557955
{
79567956
$result = array();
7957-
$pairs = call_user_func($handler, $operation, $tableName);
7957+
$pairs = call_user_func($handler, $operation, $tableName) ?: [];
79587958
$table = $this->reflection->getTable($tableName);
79597959
foreach ($pairs as $k => $v) {
79607960
if ($table->hasColumn($k)) {

src/Tqdev/PhpCrudApi/Middleware/MultiTenancyMiddleware.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ private function getCondition(string $tableName, array $pairs): Condition
3838
private function getPairs($handler, string $operation, string $tableName): array
3939
{
4040
$result = array();
41-
$pairs = call_user_func($handler, $operation, $tableName);
41+
$pairs = call_user_func($handler, $operation, $tableName) ?: [];
4242
$table = $this->reflection->getTable($tableName);
4343
foreach ($pairs as $k => $v) {
4444
if ($table->hasColumn($k)) {

0 commit comments

Comments
 (0)