PHP 7.4 Errors

6 posts by 3 authors in: Forums > CMS Builder
Last Post: April 15, 2020   (RSS)

By mark99 - February 12, 2020

We just enabled PHP 7.4 and now a lot of CMSB's admincp pages for editing your fields throw up errors like this:

(An unexpected error occurred: #86) (An unexpected error occurred: #87)

In the error log it has these (some details redacted for security).

#87 - E_WARNING: Cannot modify header information - headers already sent by (output started at /../system/lib/errorlog_functions.php:69)
/../system/lib/menus/header.php (line 4)
https://www...../system/admin....php?menu=product&action=edit& ...

#86 - E_DEPRECATED: Array and string offset access syntax with curly braces is deprecated
/../system/lib/menus/default/edit_functions.php (line 794)
https://www...../system/admin.....php?menu=product&action=edit& ...

Looks like you might want to fix that.

By mark99 - February 26, 2020

Yep that seems to work, thanks Greg.

By depdesign - April 15, 2020

Hi Greg,

This solution also help me within the cms to remove the errors, but, I also see a similar error on the "Simple Forum" now.

This is what I see on the forum:

Deprecated: Array and string offset access syntax with curly braces is deprecated in /cms/cmsAdmin/3rdParty/HTMLPurifier/HTMLPurifier.standalone.php on line 3941 Deprecated: Array and string offset access syntax with curly braces is deprecated in /cms/cmsAdmin/3rdParty/HTMLPurifier/HTMLPurifier.standalone.php on line 14584 Deprecated: Array and string offset access syntax with curly braces is deprecated in /cms/cmsAdmin/3rdParty/HTMLPurifier/HTMLPurifier.standalone.php on line 21109 Deprecated: Array and string offset access syntax with curly braces is deprecated in /cms/cmsAdmin/3rdParty/HTMLPurifier/HTMLPurifier.standalone.php on line 21109

- Dan

Dan Perez
Attachments:

screen-sample.jpg

By gregThomas - April 15, 2020

Hey Dan,

Thanks for letting us know about this one. The HTML purifier library that CMS Builder uses has three instances were it uses curly braces which are depreciated in version 7.4 of PHP. I've upgraded CMS Builder to use the latest version of the library, so this issue will be resolved in the next release. 

You can manually patch your version of CMS Builder as follows:

  1. Make a backup of your current CMS builder directory
  2. Download the zip file attached to this post with the latest version of the HTML purifier library.
  3. Navigate to your cmsb/3rdparty/HTMLPurifier directory and overwrite it with the all contents of the directory htmlpurifier-4.12.0-standalone in the zip file.
    1. Both directories should contain a file called HTMLPurifier.standalone.php and a subdirectory called standalone (see attached screenshot for example).

If you'd prefer, I can provide you with line by line instructions to update the current version of the HTML purifier library instead. 

Greg Thomas







PHP Programmer - interactivetools.com

By depdesign - April 15, 2020

Hi Greg,

Thanks for the rapid response!  The update worked!

Dan

Dan Perez