From c5d72c94f13a3e4faf15979eb4a6e920a05bd994 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Fri, 8 Aug 2014 12:19:36 +0200 Subject: [PATCH 1/2] [ticket/10404] Use anonymous function instead of create_function in acp/auth PHPBB3-10404 --- phpBB/includes/acp/auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php index 7ff3212b72..930f2811cf 100644 --- a/phpBB/includes/acp/auth.php +++ b/phpBB/includes/acp/auth.php @@ -183,7 +183,7 @@ class auth_admin extends \phpbb\auth\auth } // Defining the user-function here to save some memory - $return_acl_fill = create_function('$value', 'return ' . $acl_fill . ';'); + $return_acl_fill = function () use ($acl_fill) { return $acl_fill; }; // Actually fill the gaps if (sizeof($hold_ary)) From 27f769e4617cfe17cede765a3eea29b7c9bd430b Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Fri, 8 Aug 2014 14:01:04 +0200 Subject: [PATCH 2/2] [ticket/10404] Fix codesniffer complaint about anonymous function PHPBB3-10404 --- phpBB/includes/acp/auth.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php index 930f2811cf..905e981cdc 100644 --- a/phpBB/includes/acp/auth.php +++ b/phpBB/includes/acp/auth.php @@ -183,7 +183,10 @@ class auth_admin extends \phpbb\auth\auth } // Defining the user-function here to save some memory - $return_acl_fill = function () use ($acl_fill) { return $acl_fill; }; + $return_acl_fill = function () use ($acl_fill) + { + return $acl_fill; + }; // Actually fill the gaps if (sizeof($hold_ary))