<errormsg>preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead</errormsg>

Asked by bobby

i have an issue with this error:

--------------------------------------
LOG Dump
--------------------------------------
Date: 2014-02-20 17:41:19
Page: fault
Function:
Message: <errormsg>preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead</errormsg>
<errornum>8192</errornum>
<errortype>Deprecated Call</errortype>
<scriptname>/var/www/html/xibo/lib/app/kit.class.php</scriptname>
<scriptlinenum>274</scriptlinenum>

could anyone help me on this challenge? need help ...i'm using xibo 1.6-rc1 Apache/2.4.6 (Fedora) PHP/5.5.8 mod_perl/2.0.8-dev Perl/v5.16.3

Question information

Language:
English Edit question
Status:
Solved
For:
Xibo Edit question
Assignee:
No assignee Edit question
Solved by:
bobby
Solved:
Last query:
Last reply:
Revision history for this message
bobby (crypt3rc0d3) said :
#1

any update??

Revision history for this message
bobby (crypt3rc0d3) said :
#2

//$return = preg_replace('/&#(\d+);/me', "chr(\\1)", $return); // decimal notation
$return = preg_replace_callback('/&#(\d+);/m', function($m){
    return chr($m[1]);
}, $return);

// convert hex
//$return = preg_replace('/&#x([a-f0-9]+);/mei', "chr(0x\\1)", $return); // hex notation
$return = preg_replace_callback('/&#x([a-f0-9]+);/mi', function($m){
    return chr("0x".$m[1]);
}, $return);

Revision history for this message
Dan Garner (dangarner) said :
#3

Thanks for the patch - I have created a bug and linked it up.

Revision history for this message
Klodi (kshqiponja) said :
#4

I have the same problem:

<errormsg>preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead</errormsg>
<errornum>8192</errornum>
<errortype>Deprecated Call</errortype>
<scriptname>/home/dsa/public_html/digital2/lib/app/kit.class.php</scriptname>
<scriptlinenum>262</scriptlinenum>

can anyone check?

thanks