Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pdoCrumbs issue #367

Open
krava77 opened this issue Jul 24, 2023 · 0 comments
Open

pdoCrumbs issue #367

krava77 opened this issue Jul 24, 2023 · 0 comments
Labels

Comments

@krava77
Copy link

krava77 commented Jul 24, 2023

Сообщение об ошибке / 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 krava77 added the bug label Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant