Pārlūkot izejas kodu

Update Abstract.php

Count issue fix
Shardj 7 gadi atpakaļ
vecāks
revīzija
47e5c23892
1 mainītis faili ar 5 papildinājumiem un 1 dzēšanām
  1. 5 1
      library/Zend/Db/Table/Abstract.php

+ 5 - 1
library/Zend/Db/Table/Abstract.php

@@ -1304,7 +1304,11 @@ abstract class Zend_Db_Table_Abstract
         $whereList = array();
         $numberTerms = 0;
         foreach ($args as $keyPosition => $keyValues) {
-            $keyValuesCount = count($keyValues);
+            if (is_array($keyValues) || $keyValues instanceof Countable) {
+                $keyValuesCount = count($keyValues);
+            } else {
+                $keyValuesCount = 1;
+            }
             // Coerce the values to an array.
             // Don't simply typecast to array, because the values
             // might be Zend_Db_Expr objects.