preg_replace /e modifier
-
When the excludeheading setting is enabled, PrettyLink uses the /e modifier of the preg_replace function. As this modifier has been deprecated since PHP version 5.5.0 and removed in 7.0.0, all instances where the modifier is used, should be replaced with the preg_replace_callback function.
I.e.
$text = preg_replace('%(<h.*?>)(.*?)(</h.*?>)%sie', "'$1'.insertspecialchars('$2').'$3'", $text);should be replaced by something like
$text = preg_replace_callback('%(<h.*?>)(.*?)(</h.*?>)%si', function($matches) { return $matches[1] . insertspecialchars($matches[2]) . $matches[3]; }, $text);
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘preg_replace /e modifier’ is closed to new replies.