Safe replacement of a lot of `!count()` with `=== []`
[lhc/web/wiklou.git] / includes / clientpool / SquidPurgeClientPool.php
index f6109f1..6dd85e7 100644 (file)
@@ -61,9 +61,10 @@ class SquidPurgeClientPool {
                                        $writeSockets["$clientIndex/$i"] = $socket;
                                }
                        }
-                       if ( !count( $readSockets ) && !count( $writeSockets ) ) {
+                       if ( $readSockets === [] && $writeSockets === [] ) {
                                break;
                        }
+
                        $exceptSockets = null;
                        $timeout = min( $startTime + $this->timeout - microtime( true ), 1 );
                        Wikimedia\suppressWarnings();