]> git.mxchange.org Git - friendica.git/commitdiff
Only warn when there are arguments at all
authorMichael <heluecht@pirati.ca>
Fri, 15 Sep 2017 03:10:04 +0000 (03:10 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 15 Sep 2017 03:10:04 +0000 (03:10 +0000)
include/dba.php

index 48f195542865ee51d4100381ae11f71ef0c88a0e..16261efd2e02f3303c5df1fef0497b010ad78de1 100644 (file)
@@ -391,7 +391,7 @@ class dba {
                        return false;
                }
 
-               if (substr_count($sql, '?') != count($args)) {
+               if ((substr_count($sql, '?') != count($args)) && (count($args) > 0)) {
                        // Question: Should we continue or stop the query here?
                        logger('Parameter mismatch. Query "'.$sql.'" - Parameters '.print_r($args, true), LOGGER_DEBUG);
                }