]> git.mxchange.org Git - friendica.git/commitdiff
Remove anonymous function, 5.2 is still minimal requirement
authorFabrixxm <fabrix.xm@gmail.com>
Fri, 13 Nov 2015 08:36:22 +0000 (09:36 +0100)
committerFabrixxm <fabrix.xm@gmail.com>
Fri, 13 Nov 2015 08:36:22 +0000 (09:36 +0100)
include/html2bbcode.php

index 10a2fd13e5e24eb6be995d5fb7fbc92965e234da..736150134000cc6424812c7e12a6f74c84e39a76 100644 (file)
@@ -90,9 +90,11 @@ function html2bbcode($message)
 
        $message = str_replace("\r", "", $message);
 
-       $message = preg_replace_callback("|<pre><code>([^<]*)</code></pre>|ism", function($m) {
+       function _replace_code_cb($m){
                return "<code>".str_replace("\n","<br>\n",$m[1]). "</code>";
-       }, $message);
+       }
+       
+       $message = preg_replace_callback("|<pre><code>([^<]*)</code></pre>|ism", "_replace_code_cb", $message);
 
        $message = str_replace(array(
                                        "<li><p>",