Jump to content

Topic on Extension talk:HTMLets/Flow

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead

4
Reverse Corruption (talkcontribs)

Not sure if this is proper, but here is how I fixed it:

diff HTMLets.php HTMLets.php.org
133,137c133,135
< $text = preg_replace_callback(
< '//sm',
< function ($m) {
< return base64_decode("$m[1]");
< },
---
> $text = preg_replace(
> '//esm',
> 'base64_decode("$1")',


If anyone has a better solution, please post it.

Thank you!

Reverse Corruption

Kghbln (talkcontribs)

I think you should file a bug for this at bugzilla: and provide this patch for others to have a look at the issue.

Jongfeli (talkcontribs)

Noticed this problem to when moving to PHP 5.5.13

Filed a bug with the above code.

119.160.195.124 (talkcontribs)

how to set $v = preg_replace("/'/", "&#39;", $v); to preg_replace_callback

Reply to "Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead"