-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead. This happens with php5.5 #1
Comments
I have solved this issue by replacing line 79 & 80 by following code. $str = preg_replace_callback('/&#([0-9]+);/m', function($m){ return code2utf($m[1],$lo); }, $str); |
Had the same problem calling the library helper CodeIgniter and your solution worked properly. Thank you! |
$lo it's null inside that function. $str = preg_replace_callback('/\&\#([0-9]+)\;/m', function($m) use ($lo){return code2utf($m[1],$lo); }, $str);
$str = preg_replace_callback('/\&\#x([0-9a-fA-F]+)\;/m', function($m) use ($lo){return codeHex2utf($m[1],$lo);}, $str); |
Thanks rzds By use this my error is solved. Thanks again!! |
Hi guys, Can you help me convert this to using preg_replace_callback preg_replace('!s:(\d+):"(.*?)";!e', "'s:'.strlen('$2').':"$2";'", $input) |
Similar warnings occur for other lines.
|
This forgotten thread just saved me, thank you all haha. It works just fine! |
Hi guys, Can you help me convert this to using preg_replace_callback preg_replace('!s:(\d+):"(.*?)";!e', "'s:'.strlen('$2').':"$2";'", $input) |
I can't seem to figure out the preg_replace_callback for the code below $html = preg_replace('/{DATE\s+(.*?)}/e',"date('\1')",$html ); |
preg_replace() has been used on line 79 & 80 but now in php5.5 it have been deprecated with preg_replace_callback(), what would be solution of this problem.
mpdf/includes/functions.php :: 79 & 80 line
75 if(!function_exists('strcode2utf')){
76 function strcode2utf($str,$lo=true) {
77 //converts all the &#nnn; and &#xhhh; in a string to Unicode
78 if ($lo) { $lo = 1; } else { $lo = 0; }
79 $str = preg_replace('/&#([0-9]+);/me', "code2utf('\1',{$lo})",$str);
80 $str = preg_replace('/&#x([0-9a-fA-F]+);/me', "codeHex2utf('\1',{$lo})",$str);
81 return $str;
82 }
83 }
The text was updated successfully, but these errors were encountered: