SmartString Errors After v3.74 Upgrade
3 posts by 2 authors in: Forums > CMS Builder
Last Post: November 6 (RSS)
By mark99 - November 6
Hi,
I just upgraded from 3.71 to 3.74 on my beta install and noticed that I suddenly started getting deprecated warnings on the admincp. I am using PHP8.3
Deprecated: SmartString::fromArray() is deprecated, use "SmartArray::new($array)" instead.
/system/vendor/itools/smartstring/src/SmartString.php on line 703
This is a new addition since the previous version, so I was a bit surprised that it wouldn't be ready for PHP 8.3. The notice seems to get thrown into the log every time I try to load the 'General Settings' page and the details suggest the call comes from this URL:
https://www.MYDOMAIN.com/system/admin.php?menu=admin&action=generalServerInfoAjax&forceUpdate=1
By Dave - November 6
Hi Mark99,
Good find, yes that's a bug. We'll patch it in the next release.
If you're comfortable editing PHP you can patch it as follows:
- Open /cmsb/lib/menus/admin/general_server_info.php
- Search for: fromArray
- Replace this: SmartString::fromArray
- With this: SmartArray::new
Or alternatively, you can just temporarily uncheck this setting:
Admin > Security > Developer Warnings [_] Disable PHP developer warnings: E_STRICT, E_DEPRECATED (only needed during development)
Thanks for the report!
interactivetools.com