Index: trunk/phase3/includes/MessageCache.php |
— | — | @@ -166,7 +166,7 @@ |
167 | 167 | $message = false; |
168 | 168 | |
169 | 169 | # Try the cache |
170 | | - if ( $this->mUseCache && $this->mCache ) { |
| 170 | + if ( $this->mUseCache && $this->mCache && array_key_exists( $title, $this->mCache ) ) { |
171 | 171 | $message = $this->mCache[$title]; |
172 | 172 | } |
173 | 173 | |
Index: trunk/phase3/includes/memcached-client.php |
— | — | @@ -221,11 +221,11 @@ |
222 | 222 | */ |
223 | 223 | function memcached ($args) |
224 | 224 | { |
225 | | - $this->set_servers($args['servers']); |
226 | | - $this->_debug = $args['debug']; |
| 225 | + $this->set_servers(@$args['servers']); |
| 226 | + $this->_debug = @$args['debug']; |
227 | 227 | $this->stats = array(); |
228 | | - $this->_compress_threshold = $args['compress_threshold']; |
229 | | - $this->_persistant = isset($args['persistant']) ? $args['persistant'] : false; |
| 228 | + $this->_compress_threshold = @$args['compress_threshold']; |
| 229 | + $this->_persistant = array_key_exists('persistant', $args) ? (@$args['persistant']) : false; |
230 | 230 | $this->_compress_enable = true; |
231 | 231 | $this->_have_zlib = function_exists("gzcompress"); |
232 | 232 | |
— | — | @@ -374,7 +374,7 @@ |
375 | 375 | if (!is_resource($sock)) |
376 | 376 | return false; |
377 | 377 | |
378 | | - $this->stats['get']++; |
| 378 | + @$this->stats['get']++; |
379 | 379 | |
380 | 380 | $cmd = "get $key\r\n"; |
381 | 381 | if (!fwrite($sock, $cmd, strlen($cmd))) |
— | — | @@ -813,7 +813,7 @@ |
814 | 814 | break; |
815 | 815 | $offset += $n; |
816 | 816 | $bneed -= $n; |
817 | | - $ret[$rkey] .= $data; |
| 817 | + @$ret[$rkey] .= $data; |
818 | 818 | } |
819 | 819 | |
820 | 820 | if ($offset != $len+2) |
— | — | @@ -866,7 +866,7 @@ |
867 | 867 | if (!is_resource($sock)) |
868 | 868 | return false; |
869 | 869 | |
870 | | - $this->stats[$cmd]++; |
| 870 | + @$this->stats[$cmd]++; |
871 | 871 | |
872 | 872 | $flags = 0; |
873 | 873 | |