Skip to content
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

superfecta_base.php: preg_replace() with /e creates an error if using "Regular Expressions 1" #270

Open
heikothole opened this issue Dec 28, 2015 · 1 comment

Comments

@heikothole
Copy link

Hello,
I'm using "Regular Expressions 1" in order to get a caller name from an internal website.
But under PHP 5.5.9 the preg_replace() in line 1060 in file superfecta_base.php creates an error.
With the following fix, it worked for me:

1060,1063c1060
<           //preg_replace("/&#(\d+);/me", "chr('$1')", $goodStr);
<           $goodStr = preg_replace_callback("/&#(\d+);/m", function($matches) {
<               return "chr($matches[1])";
<           }, $goodStr); //HT: Angepasst wegen "/e" deprecated

---
>           preg_replace("/&#(\d+);/me", "chr('$1')", $goodStr);

Maybe you can use this in the next release.

Heiko

@jfrancais
Copy link

Have this same problem. Would love a fix so I dont get the modified code warning in my freepbx interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants