summaryrefslogtreecommitdiffstats
path: root/dc2e8561c551644ae6ccd07739994d905de206c2.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dc2e8561c551644ae6ccd07739994d905de206c2.patch')
-rw-r--r--dc2e8561c551644ae6ccd07739994d905de206c2.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/dc2e8561c551644ae6ccd07739994d905de206c2.patch b/dc2e8561c551644ae6ccd07739994d905de206c2.patch
new file mode 100644
index 0000000..d875b0f
--- /dev/null
+++ b/dc2e8561c551644ae6ccd07739994d905de206c2.patch
@@ -0,0 +1,34 @@
+From dc2e8561c551644ae6ccd07739994d905de206c2 Mon Sep 17 00:00:00 2001
+From: Jan Schneider <jan@horde.org>
+Date: Mon, 13 Feb 2017 14:57:35 +0100
+Subject: [PATCH] Don't use each().
+
+For modern PHP versions there is no improved performance or memory usage compared to foreach() anymore. Beside that it's deprecated in PHP 7.2.
+---
+ lib/Horde/LoginTasks/Tasklist.php | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/lib/Horde/LoginTasks/Tasklist.php b/lib/Horde/LoginTasks/Tasklist.php
+index 0812630..6346ede 100644
+--- a/lib/Horde/LoginTasks/Tasklist.php
++++ b/lib/Horde/LoginTasks/Tasklist.php
+@@ -99,8 +99,7 @@ public function ready($advance = false)
+ }
+ }
+
+- reset($this->_tasks);
+- while (list($k, $v) = each($this->_tasks)) {
++ foreach ($this->_tasks as $k => $v) {
+ if ($v->needsDisplay() && ($k >= $this->_ptr)) {
+ break;
+ }
+@@ -127,8 +126,7 @@ public function needDisplay($advance = false)
+ $tmp = array();
+ $previous = null;
+
+- reset($this->_tasks);
+- while (list(, $v) = each($this->_tasks)) {
++ foreach ($this->_tasks as $v) {
+ if (!$v->needsDisplay() ||
+ (!is_null($previous) && !$v->joinDisplayWith($previous))) {
+ break;