From: Fabrixxm Date: Fri, 13 Nov 2015 08:36:22 +0000 (+0100) Subject: Remove anonymous function, 5.2 is still minimal requirement X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fa4ee05312e44ace9fa97030ff7a49a7834e1e33;p=friendica.git Remove anonymous function, 5.2 is still minimal requirement --- 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( "
  • ",