Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit e6487d5

Browse files
author
Ben Batschelet
committed
Remove calls to deprecated each() in Library & tests
XmlRpc is not used by Magento, Marketplace, or other Zend modules, and removing it was much easier than trying to refactor the recursive function where each() was used
1 parent e2693f0 commit e6487d5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+5
-9514
lines changed

library/Zend/Cache/Backend.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function __construct(array $options = array())
7676
public function setDirectives($directives)
7777
{
7878
if (!is_array($directives)) Zend_Cache::throwException('Directives parameter must be an array');
79-
while (list($name, $value) = each($directives)) {
79+
foreach ($directives as $name => $value) {
8080
if (!is_string($name)) {
8181
Zend_Cache::throwException("Incorrect option name : $name");
8282
}

library/Zend/Config/Yaml.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ protected static function _decodeYaml($currentIndent, &$lines)
289289
{
290290
$config = array();
291291
$inIndent = false;
292-
while (list($n, $line) = each($lines)) {
292+
foreach ($line as $n => $line) {
293293
$lineno = $n + 1;
294294

295295
$line = rtrim(preg_replace("/#.*$/", "", $line));

library/Zend/Http/UserAgent/Features/Adapter/TeraWurfl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public static function getAllCapabilities(TeraWurfl $wurflObj)
8888
if (!is_array($group)) {
8989
continue;
9090
}
91-
while (list ($key, $value) = each($group)) {
91+
foreach ($group as $key => $value) {
9292
if (is_bool($value)) {
9393
// to have the same type than the official WURFL API
9494
$features[$key] = ($value ? 'true' : 'false');

0 commit comments

Comments
 (0)