From 5aee45ee9e8957cdb68fc895ef3ae0387642b895 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 7 Oct 2015 20:26:38 -0700 Subject: [PATCH] Fix default $oldOpts from 09cbebb224 This fixes the default $oldOpts value for the case when $opts is given check keys and no $oldOpts value is passed in. In that case, the getWithSetCallback() method variable $opts would be null instead of array(). Change-Id: I825062533478b37766511aae1d06dd4b81f8dba1 --- includes/libs/objectcache/WANObjectCache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/libs/objectcache/WANObjectCache.php b/includes/libs/objectcache/WANObjectCache.php index 70f2af29e4..fefecdfb06 100644 --- a/includes/libs/objectcache/WANObjectCache.php +++ b/includes/libs/objectcache/WANObjectCache.php @@ -640,7 +640,7 @@ class WANObjectCache { * @return mixed Value to use for the key */ final public function getWithSetCallback( - $key, $ttl, $callback, array $opts = array(), $oldOpts = null + $key, $ttl, $callback, array $opts = array(), $oldOpts = array() ) { // Back-compat with 1.26: Swap $ttl and $callback if ( is_int( $callback ) ) { -- 2.20.1