You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the page's entry has all its categories set (categoryIndustry, categorySolution, categoryProduct), then the page will render fine. If the entry has no selected value for one or more of those categories, then it gives this error:
PHP Warning – yii\base\ErrorException
array_push() expects at least 2 parameters, 1 given
1. in /var/www/usi-craftcms/vendor/craftcms/cms/src/elements/db/ElementRelationParamParser.php at line 216
$relElementIds[] = $element->getSourceId();
} else {
$relElementIds[] = $element->id;
if ($elementParam === 'element') {
$relSourceElementIds[] = $element->getSourceId();
}
}
} else if ($element instanceof ElementQueryInterface) {
$ids = $element->ids();
array_push($relElementIds, ...$ids);
if ($elementParam === 'element') {
array_push($relSourceElementIds, ...$ids);
}
}
}
break;
}
}
Additional info
This worked fine in Craft 3.3.13. The error appeared when I updated to 3.3.15. (And reverting to 3.3.13 makes everything work again.)
Craft version: 3.3.15
PHP version: 7.2.21
Database driver & version: MySQL 5.7.27
Plugins & versions:
Element Map 1.2.1
Feed Me 4.1.2
Field Reveal 1.0.1
Fractal 1.0.8
Logs 3.0.2
Matrix Toolbar 1.0.6
Recaptcha Verify 1.0.0
Redactor 2.4.0
Redirect plugin for Craft 3 1.0.23
SEOmatic 3.2.29
Smith 1.0.0
Snitch 3.0.0
Workflow 1.2.3
The text was updated successfully, but these errors were encountered:
I checked the server requirements page, which says PHP 7.0+. Should it say PHP 7.3+ now?
And regardless of the PHP version, it was working fine in Craft 3.3.13 (I ended up not upgrading to 3.3.15 until I got more guidance here).
Description
Current entry's search for other entries with related categories fails if the current entry doesn't have anything selected for those categories.
Steps to reproduce
My page has this query that looks for logos related to the page:
If the page's entry has all its categories set (categoryIndustry, categorySolution, categoryProduct), then the page will render fine. If the entry has no selected value for one or more of those categories, then it gives this error:
Additional info
This worked fine in Craft 3.3.13. The error appeared when I updated to 3.3.15. (And reverting to 3.3.13 makes everything work again.)
Element Map 1.2.1
Feed Me 4.1.2
Field Reveal 1.0.1
Fractal 1.0.8
Logs 3.0.2
Matrix Toolbar 1.0.6
Recaptcha Verify 1.0.0
Redactor 2.4.0
Redirect plugin for Craft 3 1.0.23
SEOmatic 3.2.29
Smith 1.0.0
Snitch 3.0.0
Workflow 1.2.3
The text was updated successfully, but these errors were encountered: