Error: Cannot access offset of type string on string
6 posts by 3 authors in: Forums > CMS Builder
Last Post: 14 hours ago (RSS)
I'm getting the following error trying to go to some sections in my CMS after an upgrade of a server which caused me to have to update CMS.
Error: Cannot access offset of type string on string
I don't know where it's coming from and my Developer Log has the same error.
The PHP version is set to 8.1 and I am running CMSB 3.65.
Any help would be appreciated.
Gary.
By Dave - Sunday at 1:56pm
Hi Gary,
Can you submit a 2nd-level support request? We'll take a look and resolve this for you:
https://interactivetools.com/support/request/
Thanks!
interactivetools.com
By garyhoffmann - Sunday at 2:50pm - edited: Sunday at 2:51pm
I have put in a second level request. As I put in the request, this is happening on multiple accounts, so I need to know what was fixed so I can apply this same change to the other accounts.
Did you get the chance to work on this yesterday or today? I'm curious as this is preventing me from editing any of my sites.
Let me know.
By Lucia - Yesterday at 5:27pm
Hi Gary,
I've looked into your request, and found the issue in a custom plugin, image_cropper.php, due to a PHP 8+ incompatibility. I've made a small fix to suppress the error, which is now letting the effected sections load.
If you need to apply the same fix to other sites, you can either copy over the image_cropper.php plugin file, or update line 15 from this:
if (@$schema[$fn]['type'] == 'upload'){
To this:
if (is_array(@$schema[$fn]) && @$schema[$fn]['type'] == 'upload'){
Let me know if you have any questions!
Thanks,
Technical Lead
interactivetools.com
By garyhoffmann - 14 hours ago
Thank you. I had no idea what was going on. The fix works correctly and I am able to get into the affected areas.