Explorar el Código

Fix php 7.2 warning

Simon Forsman hace 8 años
padre
commit
ac8155c8c9
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      lib/Alcaeus/MongoDbAdapter/Helper/ReadPreference.php

+ 1 - 1
lib/Alcaeus/MongoDbAdapter/Helper/ReadPreference.php

@@ -110,7 +110,7 @@ trait ReadPreference
                 return false;
         }
 
-        if ($readPreference == \MongoClient::RP_PRIMARY && count($tags)) {
+        if ($readPreference == \MongoClient::RP_PRIMARY && !empty($tags)) {
             trigger_error("You can't use read preference tags with a read preference of PRIMARY", E_USER_WARNING);
             return false;
         }