git://git.onelab.eu
/
plcapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove usages of 'each', as it is deprecated in php 7.2
[plcapi.git]
/
src
/
Helper
/
Http.php
diff --git
a/src/Helper/Http.php
b/src/Helper/Http.php
index
2faf583
..
03a1ab6
100644
(file)
--- a/
src/Helper/Http.php
+++ b/
src/Helper/Http.php
@@
-133,7
+133,7
@@
class Http
}
// be tolerant to line endings, and extra empty lines
$ar = preg_split("/\r?\n/", trim(substr($data, 0, $pos)));
}
// be tolerant to line endings, and extra empty lines
$ar = preg_split("/\r?\n/", trim(substr($data, 0, $pos)));
-
while (list(, $line) = @each($ar)
) {
+
foreach($ar as $line
) {
// take care of multi-line headers and cookies
$arr = explode(':', $line, 2);
if (count($arr) > 1) {
// take care of multi-line headers and cookies
$arr = explode(':', $line, 2);
if (count($arr) > 1) {