Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/u827956171/public_html/geshi/geshi.php on line 2202
if (false !== stristr($stuff_to_parse_pregquote, $keyword )) {
$stuff_to_parse .= ' ';
// Might make a more unique string for putting the number in soon
// Basically, we don't put the styles in yet because then the styles themselves will
// get highlighted if the language has a CSS keyword in it (like CSS, for example ;))
$styles = "/$k/";
$modifiers = ($this->language_data['CASE_SENSITIVE'][$k]) ? "e" : "ie";
$disallowed_before = "a-zA-Z0-9\$_\|\#;>|^";
$disallowed_after = "a-zA-Z0-9_<\|%\\-&";
if(isset($this->language_data['PARSER_CONTROL'])) {
if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS'])) {
if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_BEFORE'])) {
$disallowed_before = $this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_BEFORE'];
}
if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_AFTER'])) {
$disallowed_after = $this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_AFTER'];
}
}
}
$stuff_to_parse = preg_replace(
"/([^$disallowed_before])($keyword)(?=[^$disallowed_after])/$modifiers",
"'\\1' . $func2('\\2', '$k', 'BEGIN') . '<|$styles>' . $func('\\2') . '|>' . $func2('\\2', '$k', 'END')",
$stuff_to_parse
);
$stuff_to_parse = substr($stuff_to_parse, 0, strlen($stuff_to_parse) - 1);
}
...
//Из модификаторов убрать e
$modifiers = ($this->language_data['CASE_SENSITIVE'][$k]) ? '' : 'i';
...
//Заменить это
$stuff_to_parse = preg_replace(
"/([^$disallowed_before])($keyword)(?=[^$disallowed_after])/$modifiers",
"'\\1' . $func2('\\2', '$k', 'BEGIN') . '<|$styles>' . $func('\\2') . '|>' . $func2('\\2', '$k', 'END')",
$stuff_to_parse
);
//На это
$stuff_to_parse = preg_replace_callback(
"/([^$disallowed_before])($keyword)(?=[^$disallowed_after])/$modifiers",
function($matches) use($func, $func2, $styles, $k) {
return $matches[1].
$func2($matches[2], $k, 'BEGIN').
'<|'.$styles.'>'.
$func($matches[2]).
'|>'.
$func2($matches[2], $k, 'END');
},
$stuff_to_parse
);