View Issue Details

IDProjectCategoryView StatusLast Update
0015307phpList 3 applicationGeneralpublic09-04-10 17:22
Reporterh2b2 Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version2.10.10 
Fixed in Version2.10.11 
Summary0015307: Forward feature incompatible with < PHP 5.1.0 because of "htmlspecialchars_decode" function
Descriptionbdario reports a PHP version incompatibility in the phpList forward feature applied in lists/index.php:

======== Start quote =========

after putting error_reporting(E_ALL) inside the forwardPage() function i got this error:

Fatal error: Call to undefined function: htmlspecialchars_decode() in /var/www/vhosts/rsync/unitec/lists/index.php on line 817
phplist version 2.10.10

The "htmlspecialchars_decode" function exists only on PHP 5 >= 5.1.0 while my server PHP Version is 4.3.10-22.

======== End quote =========

Additional Informationbdario suggests the following fix:

======== Start quote =========

So I found a replacement of that function for PHP4 and I added the code just before the calling of forwardPage function, on line # 745 of the file index.php

    if (!function_exists("htmlspecialchars_decode")) {
       function htmlspecialchars_decode($string, $quote_style = ENT_COMPAT) {
           return strtr($string, array_flip(get_html_translation_table(HTML_SPECIALCHARS, $quote_style)));

and now it works
======== End quote =========

TagsNo tags attached.


has duplicate 0015268 resolved Forward link does not redirect 
child of 0015369 resolvedmichiel 2.10.10 initial patches 


There are no notes attached to this issue.