X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fobjectcache%2FMemcachedClient.php;h=787a1689ed99821d9103628402981a7874ba9495;hb=999af3001062ebbed5a9909976bdeed26084fe80;hp=536ba6ea07070291e12fa089d1e9de2fc0ef4f54;hpb=67e23ec357d2265bc487bdd4b63e30fcaf5871c7;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/objectcache/MemcachedClient.php b/includes/objectcache/MemcachedClient.php index 536ba6ea07..787a1689ed 100644 --- a/includes/objectcache/MemcachedClient.php +++ b/includes/objectcache/MemcachedClient.php @@ -277,7 +277,7 @@ class MWMemcached { * @param $exp Integer: (optional) Expiration time. This can be a number of seconds * to cache for (up to 30 days inclusive). Any timespans of 30 days + 1 second or * longer must be the timestamp of the time at which the mapping should expire. It - * is safe to use timestamps in all cases, regardless of exipration + * is safe to use timestamps in all cases, regardless of expiration * eg: strtotime("+3 hour") * * @return Boolean @@ -897,7 +897,7 @@ class MWMemcached { return false; } if ( substr( $data, -2 ) !== "\r\n" ) { - $this->_handle_error( $sock, + $this->_handle_error( $sock, 'line ending missing from data block from $1' ); return false; } @@ -1096,7 +1096,7 @@ class MWMemcached { } /** - * Read the specified number of bytes from a stream. If there is an error, + * Read the specified number of bytes from a stream. If there is an error, * mark the socket dead. * * @param $sock The socket @@ -1137,7 +1137,7 @@ class MWMemcached { function _fgets( $sock ) { $result = fgets( $sock ); // fgets() may return a partial line if there is a select timeout after - // a successful recv(), so we have to check for a timeout even if we + // a successful recv(), so we have to check for a timeout even if we // got a string response. $data = stream_get_meta_data( $sock ); if ( $data['timed_out'] ) { @@ -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 ); } }