r93695 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93694‎ | r93695 | r93696 >
Date:00:22, 2 August 2011
Author:aaron
Status:ok
Tags:
Comment:
Made load() return null on miss, since CustomDeviceRepository breaks otherwise
Modified paths:
  • /branches/wmf/1.17wmf1/extensions/MobileFrontend/library/WURFL/Storage/Mwmemcache.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/extensions/MobileFrontend/library/WURFL/Storage/Mwmemcache.php
@@ -33,7 +33,7 @@
3434 return $wgMemc->set( $this->encode( $this->namespace, $objectId ), $object, $this->expiration );
3535 }
3636
37 -
 37+
3838 /**
3939 * Load the object.
4040 *
@@ -44,7 +44,7 @@
4545 public function load($objectId) {
4646 global $wgMemc;
4747 $value = $wgMemc->get( $this->encode( $this->namespace, $objectId ) );
48 - return $value;
 48+ return $value ? $value : null; // WURFL expects null on cache miss
4949 }
5050
5151

Follow-up revisions

RevisionCommit summaryAuthorDate
r93697Ported r93695 to /trunkaaron00:27, 2 August 2011

Status & tagging log