While executing search index command in pimcore 10.5 version on production gives below error
method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given
Pimcore version: 10.5.15 Php version: 8.1 Mysql version: 8.0 Composer version 2.7.2
Please let me know the how to solve this issue.
Thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hey there!
That error usually means Pimcore is trying to call
method_exists()
on anull
value, it’s likely coming from a class or object that isn’t being set properly.You should check if any of your custom data objects or classes might be returning
null
. Add a check like:Also run this to rebuild your class definitions just in case something’s out of sync:
And clear your cache too:
If you’re getting a stack trace or line number, that can help narrow it down; feel free to share it.
- Bobby