Make sure to not unpack an associative array into parameter list
[lhc/web/wiklou.git] / includes / cache / CacheHelper.php
index b2a91c2..6c6b184 100644 (file)
@@ -294,7 +294,7 @@ class CacheHelper implements ICacheHelper {
                                $args = [ $args ];
                        }
 
-                       $value = call_user_func_array( $computeFunction, $args );
+                       $value = $computeFunction( ...$args );
 
                        if ( $this->cacheEnabled ) {
                                if ( is_null( $key ) ) {
@@ -350,7 +350,7 @@ class CacheHelper implements ICacheHelper {
                        throw new MWException( 'No cache key set, so cannot obtain or save the CacheHelper values.' );
                }
 
-               return call_user_func_array( 'wfMemcKey', $this->cacheKey );
+               return wfMemcKey( ...array_values( $this->cacheKey ) );
        }
 
        /**