From e41fdc98451fd1c1cdd6fdd673eb5dbc08d5fc98 Mon Sep 17 00:00:00 2001 From: Lukas Winkler Date: Mon, 6 Jul 2020 20:41:37 +0200 Subject: don't use create_function anywhere (#16181) --- libs/HTML/QuickForm2/Element/Date.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'libs') diff --git a/libs/HTML/QuickForm2/Element/Date.php b/libs/HTML/QuickForm2/Element/Date.php index 6a3dca2429..04b59fe547 100644 --- a/libs/HTML/QuickForm2/Element/Date.php +++ b/libs/HTML/QuickForm2/Element/Date.php @@ -171,14 +171,18 @@ class HTML_QuickForm2_Element_Date extends HTML_QuickForm2_Container_Group $this->data['maxYear'], $this->data['minYear'] > $this->data['maxYear']? -1: 1 ); - array_walk($options, create_function('&$v,$k','$v = substr($v,-2);')); + array_walk($options, function (&$v, $k) { + $v = substr($v, -2); + }); break; case 'h': $options = $this->createOptionList(1, 12); break; case 'g': $options = $this->createOptionList(1, 12); - array_walk($options, create_function('&$v,$k', '$v = intval($v);')); + array_walk($options, function (&$v, $k) { + $v = intval($v); + }); break; case 'H': $options = $this->createOptionList(0, 23); -- cgit v1.2.3