From be48d07435bcc24026c15211a3d0229d6a67f143 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Wed, 9 Apr 2008 15:22:27 +0000 Subject: [PATCH] Fixed a couple of potential catchable fatal errors when memcached debugging is enabled --- includes/memcached-client.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/includes/memcached-client.php b/includes/memcached-client.php index 21f0c83e9b..8adb5233a0 100644 --- a/includes/memcached-client.php +++ b/includes/memcached-client.php @@ -402,6 +402,10 @@ class memcached $fname = 'memcached::get'; wfProfileIn( $fname ); + if ( $this->_debug ) { + $this->_debugprint( "get($key)\n" ); + } + if (!$this->_active) { wfProfileOut( $fname ); return false; @@ -429,7 +433,7 @@ class memcached if ($this->_debug) foreach ($val as $k => $v) - $this->_debugprint(@sprintf("MemCache: sock %s got %s => %s\r\n", serialize($sock), $k, $v)); + $this->_debugprint(sprintf("MemCache: sock %s got %s\n", serialize($sock), $k)); wfProfileOut( $fname ); return @$val[$key]; @@ -495,7 +499,7 @@ class memcached if ($this->_debug) foreach ($val as $k => $v) - $this->_debugprint(sprintf("MemCache: got %s => %s\r\n", $k, $v)); + $this->_debugprint(sprintf("MemCache: got %s\n", $k)); return $val; } -- 2.20.1