Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Model/Behavior/FilteredBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,9 @@
$customConditions = [$customConditions];
}
$formatAlias = sprintf('#(?<![A-Za-z])%s(?![A-Za-z])#', $relatedTableAlias);
if (is_string($relatedModelAlias) && is_array($customConditions)) {

Check failure on line 327 in src/Model/Behavior/FilteredBehavior.php

View workflow job for this annotation

GitHub Actions / PHPStan

Call to function is_string() with non-falsy-string will always evaluate to true.

Check failure on line 327 in src/Model/Behavior/FilteredBehavior.php

View workflow job for this annotation

GitHub Actions / PHPStan

Call to function is_string() with non-falsy-string will always evaluate to true.
$filterConditions = preg_replace($formatAlias, $relatedModelAlias, $customConditions);
if (is_array($filterConditions)) {

Check failure on line 329 in src/Model/Behavior/FilteredBehavior.php

View workflow job for this annotation

GitHub Actions / PHPStan

Call to function is_array() with array will always evaluate to true.

Check failure on line 329 in src/Model/Behavior/FilteredBehavior.php

View workflow job for this annotation

GitHub Actions / PHPStan

Call to function is_array() with array will always evaluate to true.
$conditions = array_merge($conditions, $filterConditions);
}
}
Expand Down Expand Up @@ -419,7 +419,7 @@
}
break;
default:
if (strlen(trim(strval($value))) == 0) {
if (is_array($value) || strlen(trim(strval($value))) == 0) {
break;
}

Expand Down
Loading