From: Tim Starling Date: Sat, 5 Aug 2006 14:06:19 +0000 (+0000) Subject: In DBA caches: fixed return value when the key is missing X-Git-Tag: 1.31.0-rc.0~56068 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=119aafef9b974ead47290db9bc0d08fddfea77d5;p=lhc%2Fweb%2Fwiklou.git In DBA caches: fixed return value when the key is missing --- diff --git a/includes/BagOStuff.php b/includes/BagOStuff.php index d1726072d7..31d357cc4d 100644 --- a/includes/BagOStuff.php +++ b/includes/BagOStuff.php @@ -576,7 +576,7 @@ class DBABagOStuff extends BagOStuff { */ function decode( $blob ) { if ( !is_string( $blob ) ) { - return array( 0, null ); + return array( null, 0 ); } else { return array( unserialize( substr( $blob, 11 ) ), @@ -607,6 +607,7 @@ class DBABagOStuff extends BagOStuff { function get( $key ) { wfProfileIn( __METHOD__ ); + wfDebug( __METHOD__."($key)\n" ); $handle = $this->getReader(); if ( !$handle ) { return null; @@ -630,6 +631,7 @@ class DBABagOStuff extends BagOStuff { function set( $key, $value, $exptime=0 ) { wfProfileIn( __METHOD__ ); + wfDebug( __METHOD__."($key)\n" ); $blob = $this->encode( $value, $exptime ); $handle = $this->getWriter(); if ( !$handle ) {