create_function is deprecated in PHP7.2

This commit is contained in:
Mario Hommel 2019-05-09 20:13:02 +02:00
parent b72b031c08
commit f1bec45d71
3 changed files with 4 additions and 2 deletions

View file

@ -1,3 +1,5 @@
1.0: Another fix for PHP7.2 compatibility.
0.9.9: Fix constructor for compatibility with PHP7.2
0.7: Upgrade to Geshi 1.0.8.1

View file

@ -4531,7 +4531,7 @@ class GeSHi {
// TODO: a|bb|c => [ac]|bb
static $callback_2;
if (!isset($callback_2)) {
$callback_2 = create_function('$matches', 'return "[" . str_replace("|", "", $matches[1]) . "]";');
$callback_2 = function($matches) {return "[" . str_replace("|", "", $matches[1]) . "]";};
}
$list = preg_replace_callback('#\(\?\:((?:.\|)+.)\)#', $callback_2, $list);
}

View file

@ -80,7 +80,7 @@ class serendipity_event_geshi extends serendipity_event
'smarty' => '2.6.7',
'php' => '4.1.0'
));
$propbag->add('version', '0.9.9');
$propbag->add('version', '1.0');
$propbag->add('event_hooks', array('frontend_display' => true, 'frontend_comment' => true));
$propbag->add('groups', array('MARKUP'));