Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorLukas Winkler <git@lw1.at>2020-07-06 21:41:37 +0300
committerGitHub <noreply@github.com>2020-07-06 21:41:37 +0300
commite41fdc98451fd1c1cdd6fdd673eb5dbc08d5fc98 (patch)
treeb7c6529165140d522f91bb338b7de1646478ba87 /libs
parent42920ac538e7bfaaff8309c116f84dcac7d44c1e (diff)
don't use create_function anywhere (#16181)
Diffstat (limited to 'libs')
-rw-r--r--libs/HTML/QuickForm2/Element/Date.php8
1 files changed, 6 insertions, 2 deletions
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);