Error: Cannot access offset of type string on string
6 posts by 3 authors in: Forums > CMS Builder
Last Post: February 25 (RSS)
By garyhoffmann - February 22
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 - February 22
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 - February 22 - edited: February 22
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.
By garyhoffmann - February 24
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 - February 24
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 - February 25
Thank you. I had no idea what was going on. The fix works correctly and I am able to get into the affected areas.