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
When I use &showHome with &parents parameters I get error:
"[] operator not supported for strings in pdoCrumbs snippet on line 99"
the problem in snippet pdoCrumbs because we try to assign a value as an array for the $parents variable which is the string. if (!empty($showHome)) { $parents[] = $siteStart; }
We have to convert the $parents variable to the array before adding any values.
Сообщение об ошибке / Error message
Summary
When I use &showHome with &parents parameters I get error:
"[] operator not supported for strings in pdoCrumbs snippet on line 99"
the problem in snippet pdoCrumbs because we try to assign a value as an array for the $parents variable which is the string.
if (!empty($showHome)) { $parents[] = $siteStart; }
We have to convert the $parents variable to the array before adding any values.
Step to play
[[pdoCrumbs?
&showAtHome=
0
&showHome=
1
&parents=
1
]]
Here is my modx server:
MODX Revolution 3.0.3-pl, 10.11.2-MariaDB, PHP Version 8.1.6, nginx/1.23.3
The text was updated successfully, but these errors were encountered: