From 62ba0950e143fbbacf82b732349d796db0d47fd3 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Fri, 22 May 2015 18:44:10 +0200 Subject: [PATCH] Replace array_walk with array_map in 512b71762e --- .../TemplateListenerCodeCacheBuilder.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wcfsetup/install/files/lib/system/cache/builder/TemplateListenerCodeCacheBuilder.class.php b/wcfsetup/install/files/lib/system/cache/builder/TemplateListenerCodeCacheBuilder.class.php index 185049c890..81bff15522 100644 --- a/wcfsetup/install/files/lib/system/cache/builder/TemplateListenerCodeCacheBuilder.class.php +++ b/wcfsetup/install/files/lib/system/cache/builder/TemplateListenerCodeCacheBuilder.class.php @@ -39,18 +39,18 @@ class TemplateListenerCodeCacheBuilder extends AbstractCacheBuilder { if ($templateListener->options) { $options = explode(',', strtoupper($templateListener->options)); - array_walk($options, function(&$value, $key) { - $value = "('".$value."'|defined && '".$value."'|constant)"; - }); + $options = array_map(function($value) { + return "('".$value."'|defined && '".$value."'|constant)"; + }, $options); $templateCode .= '('.implode(' || ', $options).')'; } if ($templateListener->permissions) { $permissions = explode(',', $templateListener->permissions); - array_walk($permissions, function(&$value, $key) { - $value = "\$__wcf->session->getPermission('".$value."')"; - }); + $permissions = array_map(function($value) { + return "\$__wcf->session->getPermission('".$value."')"; + }, $permissions); if (!empty($options)) { $templateCode .= " && "; -- 2.20.1