Stop php strict error warnings from MemcachedClient::_flush_read_buffer()
authorawjrichards <arichards@wikimedia.org>
Fri, 12 Oct 2012 00:12:27 +0000 (17:12 -0700)
committerawjrichards <arichards@wikimedia.org>
Fri, 12 Oct 2012 18:46:41 +0000 (11:46 -0700)
Change-Id: I467f293e3be30c7019111a368491c1a3a6a2af08

includes/objectcache/MemcachedClient.php

index 536ba6e..c858753 100644 (file)
@@ -1167,10 +1167,16 @@ class MWMemcached {
                if ( !is_resource( $f ) ) {
                        return;
                }
-               $n = stream_select( $r = array( $f ), $w = null, $e = null, 0, 0 );
+               $r = array( $f );
+               $w = null;
+               $e = null;
+               $n = stream_select( $r, $w, $e, 0, 0 );
                while ( $n == 1 && !feof( $f ) ) {
                        fread( $f, 1024 );
-                       $n = stream_select( $r = array( $f ), $w = null, $e = null, 0, 0 );
+                       $r = array( $f );
+                       $w = null;
+                       $e = null;
+                       $n = stream_select( $r, $w, $e, 0, 0 );
                }
        }