In PHP 5.5 the following notice is displayed:
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in ...path_to_phpdocx/lib/dompdfParser/include/parserhtml.cls.php on line 442
Any fix for that?
🏷️ Limited Offer: 25% OFF 🏷️
First 100 purchases only — Special discount!
Use this coupon on checkout: PHPDXPJ_D1SC1N5T
Get it nowIn PHP 5.5 the following notice is displayed:
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in ...path_to_phpdocx/lib/dompdfParser/include/parserhtml.cls.php on line 442
Any fix for that?
Hello,
You can avoid that message, it's just a deprecated parameter in PHP 5.5, changing the error reporting level in your PHP config.
Regards.
I changed the error level in php.ini but it made no difference.
Exactly what needs to be changed and where?
Thanks.
Hello,
You can hide deprecated messages in the php.ini:
error_reporting = E_ALL & ~E_DEPRECATED
or using PHP:
error_reporting(E_ALL ^ E_DEPRECATED);
error_reporting(E_ALL ^ E_DEPRECATED);
Regards.
Is there any fix without disable deprecated messages?
For the developer this should not be a big problem.
Hello,
You just need to use this code:
$str = preg_replace_callback(
                        '/>(\s*$\s*)</m',
                        create_function('$matches', "return strpos('$matches[0]', ' ') === false?'><':'> <';"),
                        $str
                        );
instead of the deprecated sentence.
Regards.