Page MenuHomePhabricator

0001-bug-44024-xcache_get-returns-null-on-non-existent-ke.patch

Authored By
bzimport
Nov 22 2014, 1:18 AM
Size
941 B
Referenced Files
None
Subscribers
None

0001-bug-44024-xcache_get-returns-null-on-non-existent-ke.patch

From 7805f69c510c26ea729d74d35e9593263e0b21c2 Mon Sep 17 00:00:00 2001
From: Pierre Schmitz <pierre@archlinux.de>
Date: Fri, 18 Jan 2013 16:22:22 +0100
Subject: [PATCH] (bug 44024) xcache_get returns null on non-existent keys
BagOStuff::get() expects a boolean fals if the key we are looking for does not
exist. As xcache_get() will return null here we have to handle this case.
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
---
includes/objectcache/XCacheBagOStuff.php | 2 ++
1 file changed, 2 insertions(+)
diff --git a/includes/objectcache/XCacheBagOStuff.php b/includes/objectcache/XCacheBagOStuff.php
index f740ae8..2722e9c 100644
--- a/includes/objectcache/XCacheBagOStuff.php
+++ b/includes/objectcache/XCacheBagOStuff.php
@@ -44,6 +44,8 @@ class XCacheBagOStuff extends BagOStuff {
} else {
$val = unserialize( $val );
}
+ } elseif ( is_null( $val ) ) {
+ return false;
}
return $val;
--
1.8.1.1

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
9866
Default Alt Text
0001-bug-44024-xcache_get-returns-null-on-non-existent-ke.patch (941 B)

Event Timeline