From: Aaron Schulz Date: Thu, 8 Oct 2015 03:26:38 +0000 (-0700) Subject: Fix default $oldOpts from 09cbebb224 X-Git-Tag: 1.31.0-rc.0~9491 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=5aee45ee9e8957cdb68fc895ef3ae0387642b895 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 --- 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 ) ) {