Error Message on Update to PHP 8.5
2 posts by 2 authors in: Forums > CMS Builder
Last Post: about an hour ago (RSS)
By nmsinc - 5 hours ago
I'm receiving the following error when i attempt to update to PHP 8.5 | any help would be greatly appreciated.
Fatal error: Cannot redeclare function array_first() in /home/creditsc/public_html/cmsAdmin/lib/array_functions.php on line 6 Stack trace: #0 /home/creditsc/public_html/cmsAdmin/lib/init.php(26): Itools\Cmsb\init() #1 /home/creditsc/public_html/cmsAdmin/lib/viewer_functions.php(13): require_once('/home/creditsc/...') #2 /home/creditsc/public_html/collections/workAccounts.php(8): include_once('/home/creditsc/...') #3 {main}
By Dave - about an hour ago
Hi nmsinc,
Thanks for posting the error. There are two ways to fix it:
- Upgrade to v3.81 or later, which supports PHP 8.5.
- Or remove the array_first() function from cmsAdmin/lib/array_functions.php (it starts at line 6).
We've had our own array_first() function in CMS Builder for years, because PHP didn't have one. PHP 8.5 added its own array_first(), and PHP doesn't allow two functions with the same name, so now the two conflict. Newer versions of CMS Builder use PHP's built-in version instead.
Hope that helps, let me know any other questions.
Thanks!
interactivetools.com