From fa4ee05312e44ace9fa97030ff7a49a7834e1e33 Mon Sep 17 00:00:00 2001 From: Fabrixxm Date: Fri, 13 Nov 2015 09:36:22 +0100 Subject: [PATCH] Remove anonymous function, 5.2 is still minimal requirement --- include/html2bbcode.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/html2bbcode.php b/include/html2bbcode.php index 10a2fd13e5..7361501340 100644 --- a/include/html2bbcode.php +++ b/include/html2bbcode.php @@ -90,9 +90,11 @@ function html2bbcode($message) $message = str_replace("\r", "", $message); - $message = preg_replace_callback("|
([^<]*)
|ism", function($m) { + function _replace_code_cb($m){ return "".str_replace("\n","
\n",$m[1]). "
"; - }, $message); + } + + $message = preg_replace_callback("|
([^<]*)
|ism", "_replace_code_cb", $message); $message = str_replace(array( "
  • ",