Commit 0488ae4d authored by Mark Nielsen's avatar Mark Nielsen Committed by Cecilia Vela Gurovic
Browse files

Bug 1693559: php7 compatibility issue in search/internal/lib.php file

behatnotneeded
Change-Id: I336bdb523c0ff138351d77f747a233cc390b44af
parent 560538d9
......@@ -1298,7 +1298,9 @@ class PluginSearchInternal extends PluginSearch {
$newtable = array_diff($table, $exclude);
// Use a regexp to select all entities in one pass, to avoid decoding double-escaped entities twice.
return preg_replace('/&(#x?)?([A-Za-z0-9]+);/e', '_decode_entities("$1", "$2", "$0", $newtable, $exclude)', $text);
return preg_replace_callback('/&(#x?)?([A-Za-z0-9]+);/', function (array $matches) use ($newtable, $exclude) {
return PluginSearchInternal::_decode_entities($matches[1], $matches[2], $matches[0], $newtable, $exclude);
}, $text);
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment