undefined function: html_entity_decode() using php prior to version 4.3
Using PHP Version 4.2.1
When trying to add events to my MySQL database or the flatfile I get the following PHP error in my events\phperror.log file:
[19-Jul-2005 11:18:16] PHP Fatal error: Call to undefined function: html_entity_decode() in d:\inetpub\wwwroot\accomm\ezphpcal\functions\class .inputfilter_clean.php on line 151
Researched and found out that the above function was introduced in version 4.3, I found out how to emulate html_entity_decode for versions of php prior to 4.3:
$trans_tbl = get_html_translation_table(HTML_ENTITIES);
$trans_tbl = array_flip($trans_tbl);
return strtr($string, $trans_tbl);
I added this to the config.inc.php file and everything works fine to post but then I could not get to my admin panel.
Is this a fix you can add easily or is there a better place to put this function?
>> I added this function to the top of functions\class.inputfilter_clean.php and it appears to work ok
Last edited by jperry1; 07-19-2005 at 11:51 AM.
Reason: Possible solution