Explorar o código

Fix php 7.2 warning

Simon Forsman %!s(int64=8) %!d(string=hai) anos
pai
achega
ac8155c8c9
Modificáronse 1 ficheiros con 1 adicións e 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;
         }