Skip to content

Commit 954a5ec

Browse files
committed
Fix potential PHP error
1 parent 8b107d3 commit 954a5ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/fields/conditions/RelationalFieldConditionRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public function modifyQuery(ElementQueryInterface $query): void
140140
$field instanceof CustomField &&
141141
$field->getFieldUid() === $this->_fieldUid
142142
));
143-
if (count($allInstances) > 1) {
143+
if ($allInstances && count($allInstances) > 1) {
144144
$valueSql = $field->getValueSql();
145145
switch ($this->operator) {
146146
case self::OPERATOR_RELATED_TO:

0 commit comments

Comments
 (0)