When using this module with the latest library, I get the following error:
Deprecated function: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead i hl_spec() (line 379 in /var/www/lejeguiden/sites/all/modules/htmLawed/htmLawed/htmLawed.php).
The issue is that htmLawed.php is using a function that is deprecated in php 5.5.x (source: http://www.php.net/manual/en/migration55.deprecated.php)
I'm aware that this error really belongs to the htmLawed library, rather than this Drupal module. But as this error has quite an impact on this module, I think that some action should be taken. For example, it could be noted on the project page and/or in the README.txt. Instructions for patching the library could even be given.
Comments
Comment #1
rosell.dk commentedComment #2
rosell.dk commentedComment #3
rosell.dk commentedComment #4
rosell.dk commentedA patch is suggested here:
http://vanillaforums.org/discussion/25715/htmlawed-causing-a-fatal-error...
It does get rid of the error, but I'm not sure if it breaks the functionality. It seems that simply removing the "e" option of preg_replace would change functionality. It rather seems one should change from using preg_replace() to using preg_replace_callback(), as indicated here: http://www.php.net/manual/en/migration55.deprecated.php
Comment #5
alpha2zee commentedhtmLawed has been updated to version 1.1.17 to address the PHP 5.5 compatibility issue noted here. The one instance of the use of preg_replace with the e modifier (in function hl_spec of htmLawed) was modified to use preg_replace_callback instead. Users of the htmLawed Drupal module who have the PHP 5.5 environment can download the htmLawed.php file for htmLawed version 1.1.17 to replace the htmLawed.php file in the Drupal module's directory
Comment #6
alpha2zee commentedThe htmLawed Drupal module has been updated to fix this issue. The htmLawed.php and the htmLawed help files included with the module were updated to version 1.1.17 (from 1.1.10). The main module files remain unaltered. Admins can also simply replace the two htmLawed files in the htmLawed sub-directory of the module instead of updating the module per se.
Comment #7
brad.bulger commentedif this was fixed in 2014, why does the change not appear in 3.2, supposedly built in 2015?
Comment #8
alpha2zee commentedVersion 7.x-3.2 of the module, released in 2012, was updated to 3.3 in 2014 to fix the issue. See https://www.drupal.org/node/254653/release. Someone using 3.2 who does not want to update the module can fix the issue by replacing the files within the htmLawed sub-directory of the module with their latest versions from http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed.
Comment #9
brad.bulger commentedah i wasn't getting the most recent version because of htmLawed vs htmlawed. i thought something seemed wrong. thanks.