pdoTools icon indicating copy to clipboard operation
pdoTools copied to clipboard

pdoCrumbs issue

Open krava77 opened this issue 1 year ago • 0 comments

Сообщение об ошибке / 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

krava77 avatar Jul 24 '23 08:07 krava77