]> git.mxchange.org Git - friendica.git/commitdiff
Fixed syntax error in usage of anonymous function.
authorRainulf Pineda <rainulf@rainulf.ca>
Thu, 26 Jul 2012 01:38:28 +0000 (21:38 -0400)
committerRainulf Pineda <rainulf@rainulf.ca>
Thu, 26 Jul 2012 01:38:28 +0000 (21:38 -0400)
include/diaspora.php

index cea66db0c0531dca0d9a942d805405baf3d06fe7..a23c11bd2161f947d50361602e6ce7601601d507 100755 (executable)
@@ -2156,9 +2156,9 @@ function diaspora_send_status($item,$owner,$contact,$public_batch = false) {
        /**
         * Transform #tags, strip off the [url] and replace spaces with underscore
         */
-       $body = preg_replace_callback('/#\[url\=(\w+.*?)\](\w+.*?)\[\/url\]/i', function($match) {
-               return '#'. str_replace(' ', '_', $match[2]);
-       }, $body);
+       $body = preg_replace_callback('/#\[url\=(\w+.*?)\](\w+.*?)\[\/url\]/i', create_function('$match',
+               'return \'#\'. str_replace(\' \', \'_\', $match[2]);'
+       ), $body);
 
        //if(strlen($title))
        //      $body = "[b]".html_entity_decode($title)."[/b]\n\n".$body;