]> git.mxchange.org Git - friendica.git/commitdiff
some reported warnings cleaned up
authorfriendica <info@friendica.com>
Thu, 29 Mar 2012 03:50:09 +0000 (20:50 -0700)
committerfriendica <info@friendica.com>
Thu, 29 Mar 2012 03:50:09 +0000 (20:50 -0700)
include/dba.php
include/diaspora.php
include/email.php

index 5beea7a3acad8a642a9df15549c729ddcabe7ff1..138e82b58bf1e7431c965d78a7fc1224f78215a6 100755 (executable)
@@ -207,7 +207,10 @@ function q($sql) {
        unset($args[0]);
 
        if($db && $db->connected) {
-               $ret = $db->q(vsprintf($sql,$args));
+               $stmt = vsprintf($sql,$args);
+               if($stmt === false)
+                       logger('dba: vsprintf error: ' . print_r(debug_bracktrace(),true));
+               $ret = $db->q($stmt);
                return $ret;
        }
 
index 84d28a7ecf2fceb8db6dc5ac47fa52b5befff771..104ccadf2ec51a378d3627264bd21184eafd0489 100755 (executable)
@@ -688,9 +688,9 @@ function diaspora_post($importer,$xml) {
 
                                // don't link tags that are already embedded in links
 
-                               if(preg_match('/\[(.*?)' . preg_quote($tag) . '(.*?)\]/',$body))
+                               if(preg_match('/\[(.*?)' . preg_quote($tag,'/') . '(.*?)\]/',$body))
                                        continue;
-                               if(preg_match('/\[(.*?)\]\((.*?)' . preg_quote($tag) . '(.*?)\)/',$body))
+                               if(preg_match('/\[(.*?)\]\((.*?)' . preg_quote($tag,'/') . '(.*?)\)/',$body))
                                        continue;
 
                                $basetag = str_replace('_',' ',substr($tag,1));
@@ -853,9 +853,9 @@ function diaspora_reshare($importer,$xml) {
 
                                // don't link tags that are already embedded in links
 
-                               if(preg_match('/\[(.*?)' . preg_quote($tag) . '(.*?)\]/',$body))
+                               if(preg_match('/\[(.*?)' . preg_quote($tag,'/') . '(.*?)\]/',$body))
                                        continue;
-                               if(preg_match('/\[(.*?)\]\((.*?)' . preg_quote($tag) . '(.*?)\)/',$body))
+                               if(preg_match('/\[(.*?)\]\((.*?)' . preg_quote($tag,'/') . '(.*?)\)/',$body))
                                        continue;
 
 
@@ -1094,9 +1094,9 @@ function diaspora_comment($importer,$xml,$msg) {
 
                                // don't link tags that are already embedded in links
 
-                               if(preg_match('/\[(.*?)' . preg_quote($tag) . '(.*?)\]/',$body))
+                               if(preg_match('/\[(.*?)' . preg_quote($tag,'/') . '(.*?)\]/',$body))
                                        continue;
-                               if(preg_match('/\[(.*?)\]\((.*?)' . preg_quote($tag) . '(.*?)\)/',$body))
+                               if(preg_match('/\[(.*?)\]\((.*?)' . preg_quote($tag,'/') . '(.*?)\)/',$body))
                                        continue;
 
 
index bd44cb763e55a0b5741d8471a621efdef3b14510..b43ae0dc1c200614a94e4beef83a04b543f65b99 100755 (executable)
@@ -250,7 +250,7 @@ function email_header_encode($in_str, $charset) {
 
         // remove trailing spacer and
         // add start and end delimiters
-        $spacer = preg_quote($spacer);
+        $spacer = preg_quote($spacer,'/');
         $out_str = preg_replace("/" . $spacer . "$/", "", $out_str);
         $out_str = $start . $out_str . $end;
     }