diff options
author | Remi Collet <remi@remirepo.net> | 2019-12-16 09:14:12 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2019-12-16 09:14:12 +0100 |
commit | 01ef0638f7a1eb98601701ae1d55343983a7f237 (patch) | |
tree | 83c41701446e70134a2025c3e207f7322ca047cd /d64eb3a776eb017caa7a504ac4b4d9608bfcf1cc.patch | |
parent | 04f36f583570ddc9a87a6d8f1d0359ad8b3ca68e (diff) |
Diffstat (limited to 'd64eb3a776eb017caa7a504ac4b4d9608bfcf1cc.patch')
-rw-r--r-- | d64eb3a776eb017caa7a504ac4b4d9608bfcf1cc.patch | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/d64eb3a776eb017caa7a504ac4b4d9608bfcf1cc.patch b/d64eb3a776eb017caa7a504ac4b4d9608bfcf1cc.patch deleted file mode 100644 index 19f3730..0000000 --- a/d64eb3a776eb017caa7a504ac4b4d9608bfcf1cc.patch +++ /dev/null @@ -1,46 +0,0 @@ -From d64eb3a776eb017caa7a504ac4b4d9608bfcf1cc 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/Text/Flowed.php | 9 +++------ - 1 file changed, 3 insertions(+), 6 deletions(-) - -diff --git a/lib/Horde/Text/Flowed.php b/lib/Horde/Text/Flowed.php -index fb5befd..b5a6cfe 100644 ---- a/lib/Horde/Text/Flowed.php -+++ b/lib/Horde/Text/Flowed.php -@@ -127,9 +127,8 @@ public function toFixed($quote = false) - $txt = ''; - - $this->_reformat(false, $quote); -- reset($this->_output); - $lines = count($this->_output) - 1; -- while (list($no, $line) = each($this->_output)) { -+ foreach ($this->_output as $no => $line) { - $txt .= $line['text'] . (($lines == $no) ? '' : "\n"); - } - -@@ -172,8 +171,7 @@ public function toFlowed($quote = false, array $opts = array()) - $txt = ''; - - $this->_reformat(true, $quote, empty($opts['nowrap'])); -- reset($this->_output); -- while (list(,$line) = each($this->_output)) { -+ foreach ($this->_output as $line) { - $txt .= $line['text'] . "\n"; - } - -@@ -206,9 +204,8 @@ protected function _reformat($toflowed, $quote, $wrap = true) - $text = preg_split("/\r?\n/", $this->_text); - $text_count = count($text) - 1; - $skip = 0; -- reset($text); - -- while (list($no, $line) = each($text)) { -+ foreach ($text as $no => $line) { - if ($skip) { - --$skip; - continue; |