From f1bec45d71463c423f2b5856c7511fc5a77bae30 Mon Sep 17 00:00:00 2001 From: Mario Hommel Date: Thu, 9 May 2019 20:13:02 +0200 Subject: [PATCH] create_function is deprecated in PHP7.2 --- serendipity_event_geshi/ChangeLog | 2 ++ serendipity_event_geshi/geshi.php | 2 +- serendipity_event_geshi/serendipity_event_geshi.php | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/serendipity_event_geshi/ChangeLog b/serendipity_event_geshi/ChangeLog index 6271130e..0356ab3e 100644 --- a/serendipity_event_geshi/ChangeLog +++ b/serendipity_event_geshi/ChangeLog @@ -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 diff --git a/serendipity_event_geshi/geshi.php b/serendipity_event_geshi/geshi.php index 5413faaf..df3452eb 100644 --- a/serendipity_event_geshi/geshi.php +++ b/serendipity_event_geshi/geshi.php @@ -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); } diff --git a/serendipity_event_geshi/serendipity_event_geshi.php b/serendipity_event_geshi/serendipity_event_geshi.php index a7387e03..6fd80922 100644 --- a/serendipity_event_geshi/serendipity_event_geshi.php +++ b/serendipity_event_geshi/serendipity_event_geshi.php @@ -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'));