From eba0c36fbf02dd64135778aaa0bd7adf593b86c1 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Tue, 8 Jul 2008 00:43:24 +0000 Subject: [PATCH] (bug 14159) Use of MEMCACHE_COMPRESSED constant causes an E_NOTICE on PHP installs with the Memcache module installed. Renamed to MEMCACHE_MCOMPRESSED. --- RELEASE-NOTES | 2 ++ includes/memcached-client.php | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 54908fe209..accb3e4b53 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -422,6 +422,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 14709) Fix login success message formatting when using cookie check * (bug 14710) Remove "donate" link from default sidebar * (bug 14745) Image moving works on sites that transform thumbnails via 404 +* (bug 14159) Use of MEMCACHE_COMPRESSED constant no longer causes E_NOTICE + on PHP installs with the Memcache module installed. === API changes in 1.13 === diff --git a/includes/memcached-client.php b/includes/memcached-client.php index 6bd1838739..1a3d39ce62 100644 --- a/includes/memcached-client.php +++ b/includes/memcached-client.php @@ -86,7 +86,7 @@ class memcached /** * Flag: indicates data is compressed */ - const COMPRESSED = 2; + const MCOMPRESSED = 2; // }}} @@ -908,7 +908,7 @@ class memcached return false; } - if ($this->_have_zlib && $flags & memcached::COMPRESSED) + if ($this->_have_zlib && $flags & memcached::MCOMPRESSED) $ret[$rkey] = gzuncompress($ret[$rkey]); $ret[$rkey] = rtrim($ret[$rkey]); @@ -973,7 +973,7 @@ class memcached $this->_debugprint(sprintf("client: compressing data; was %d bytes is now %d bytes\n", $len, $c_len)); $val = $c_val; $len = $c_len; - $flags |= memcached::COMPRESSED; + $flags |= memcached::MCOMPRESSED; } } if (!$this->_safe_fwrite($sock, "$cmd $key $flags $exp $len\r\n$val\r\n")) -- 2.20.1