Browse Source

use false instead of null

Johannes Jordan 8 years ago
parent
commit
d7f04ce1b4
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/ORM/Behavior/CounterCacheBehavior.php

+ 2 - 2
src/ORM/Behavior/CounterCacheBehavior.php

@@ -238,7 +238,7 @@ class CounterCacheBehavior extends Behavior
             } else {
                 $count = $this->_getCount($config, $countConditions);
             }
-            if (!is_null($count)) {
+            if ($count !== false) {
                 $assoc->getTarget()->updateAll([$field => $count],
                     $updateConditions);
             }
@@ -252,7 +252,7 @@ class CounterCacheBehavior extends Behavior
                 } else {
                     $count = $this->_getCount($config, $countOriginalConditions);
                 }
-                if (!is_null($count)) {
+                if ($count !== false) {
                     $assoc->getTarget()->updateAll([$field => $count],
                         $updateOriginalConditions);
                 }