diff options
author | Lukas Winkler <git@lw1.at> | 2020-07-06 21:41:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-06 21:41:37 +0300 |
commit | e41fdc98451fd1c1cdd6fdd673eb5dbc08d5fc98 (patch) | |
tree | b7c6529165140d522f91bb338b7de1646478ba87 | |
parent | 42920ac538e7bfaaff8309c116f84dcac7d44c1e (diff) |
don't use create_function anywhere (#16181)
-rw-r--r-- | libs/HTML/QuickForm2/Element/Date.php | 8 | ||||
-rw-r--r-- | plugins/Diagnostics/Diagnostic/PhpFunctionsCheck.php | 2 | ||||
-rw-r--r-- | plugins/Installation/lang/en.json | 1 |
3 files changed, 6 insertions, 5 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); diff --git a/plugins/Diagnostics/Diagnostic/PhpFunctionsCheck.php b/plugins/Diagnostics/Diagnostic/PhpFunctionsCheck.php index 99179468fd..fdde86e4e6 100644 --- a/plugins/Diagnostics/Diagnostic/PhpFunctionsCheck.php +++ b/plugins/Diagnostics/Diagnostic/PhpFunctionsCheck.php @@ -57,7 +57,6 @@ class PhpFunctionsCheck implements Diagnostic { return array( 'debug_backtrace', - 'create_function', 'eval', 'hash', 'gzcompress', @@ -100,7 +99,6 @@ class PhpFunctionsCheck implements Diagnostic { $messages = array( 'debug_backtrace' => 'Installation_SystemCheckDebugBacktraceHelp', - 'create_function' => 'Installation_SystemCheckCreateFunctionHelp', 'eval' => 'Installation_SystemCheckEvalHelp', 'hash' => 'Installation_SystemCheckHashHelp', 'gzcompress' => 'Installation_SystemCheckGzcompressHelp', diff --git a/plugins/Installation/lang/en.json b/plugins/Installation/lang/en.json index cd78595a6c..ffe9c33f2f 100644 --- a/plugins/Installation/lang/en.json +++ b/plugins/Installation/lang/en.json @@ -69,7 +69,6 @@ "SuperUserSetupSuccess": "Super User created successfully!", "SystemCheck": "System Check", "SystemCheckAutoUpdateHelp": "Note: Matomo's One Click update requires write-permissions to the Matomo folder and its contents.", - "SystemCheckCreateFunctionHelp": "Matomo uses anonymous functions for callbacks.", "SystemCheckDatabaseExtensions": "MySQL extensions", "SystemCheckDatabaseHelp": "Matomo requires either the mysqli extension or both the PDO and pdo_mysql extensions.", "SystemCheckDatabaseSSL": "Database SSL Connection", |