From 2537c599d3ced740a1e7b6882be9c750ab9fc25d Mon Sep 17 00:00:00 2001 From: Razvan Rosca Date: Tue, 24 Jul 2018 21:15:35 +0300 Subject: [PATCH] Fix Geshi for PHP7.2+ This will fix "Function create_function() is deprecated". --- htdocs/application/libraries/geshi/geshi.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/application/libraries/geshi/geshi.php b/htdocs/application/libraries/geshi/geshi.php index 4effa48..f2192cf 100644 --- a/htdocs/application/libraries/geshi/geshi.php +++ b/htdocs/application/libraries/geshi/geshi.php @@ -4695,7 +4695,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); }