Rerun Feature 5388: Print Invoices (documents) list gets too long. Fixed by default...
[fa-stable.git] / reporting / includes / html_entity_decode_php4.php
index 27d5f36bcfdd7e03278afea7066d5a1ac41f1369..9b90e4bf63710a857e96c519093ac91301ee7acb 100644 (file)
@@ -332,8 +332,8 @@ function html_entity_decode_php4($text_to_convert) {
                "&lt;" => "<"
        );
        $return_text = strtr($text_to_convert, $htmlentities_table);
-       
-       if (version_compare(PHP_VERSION, '5.3.0') >= 0) // 07.11.2014, from php 5.3.0 fixed deprecated preg_replace with the /e flag. Joe. 
+
+       if (version_compare(PHP_VERSION, '5.3.0') >= 0 && function_exists("preg_replace_callback"))
        {
                $return_text = preg_replace_callback('~&#x([0-9a-f]+);~i', function ($m){ return chr(hexdec($m[1]));}, $return_text);
                $return_text = preg_replace_callback('~&#([0-9]+);~', function ($m){ return chr($m[1]);}, $return_text);
@@ -349,4 +349,3 @@ function html_entity_decode_php4($text_to_convert) {
 //============================================================+
 // END OF FILE
 //============================================================+
-?>
\ No newline at end of file