From: Aaron Schulz Date: Thu, 25 May 2017 10:40:26 +0000 (-0700) Subject: Add missing ampersand to getMultiWithSetCallback() callback X-Git-Tag: 1.31.0-rc.0~3138^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=cbff84a5b969a371c2597ce366310a8b69e055c6;p=lhc%2Fweb%2Fwiklou.git Add missing ampersand to getMultiWithSetCallback() callback Also fixed a php example block comment Change-Id: Ib6967180ad0d45aec7b7d4b6d383723e2c95fefa --- diff --git a/includes/libs/objectcache/WANObjectCache.php b/includes/libs/objectcache/WANObjectCache.php index f0a439a21a..bc6047f93d 100644 --- a/includes/libs/objectcache/WANObjectCache.php +++ b/includes/libs/objectcache/WANObjectCache.php @@ -1073,7 +1073,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface { * // Time-to-live (in seconds) * $cache::TTL_DAY, * // Function that derives the new key value - * return function ( $id, $oldValue, &$ttl, array &$setOpts ) { + * function ( $id, $oldValue, &$ttl, array &$setOpts ) { * $dbr = wfGetDB( DB_REPLICA ); * // Account for any snapshot/replica DB lag * $setOpts += Database::getCacheSetOptions( $dbr ); @@ -1118,7 +1118,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface { // Wrap $callback to match the getWithSetCallback() format while passing $id to $callback $id = null; - $func = function ( $oldValue, &$ttl, array $setOpts, $oldAsOf ) use ( $callback, &$id ) { + $func = function ( $oldValue, &$ttl, array &$setOpts, $oldAsOf ) use ( $callback, &$id ) { return $callback( $id, $oldValue, $ttl, $setOpts, $oldAsOf ); };