Skip to content

Commit

Permalink
Remove calls to deprecated each() in Library & tests
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Ben Batschelet committed Mar 9, 2018
1 parent e2693f0 commit e6487d5
Show file tree
Hide file tree
Showing 58 changed files with 5 additions and 9,514 deletions.
2 changes: 1 addition & 1 deletion library/Zend/Cache/Backend.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function __construct(array $options = array())
public function setDirectives($directives)
{
if (!is_array($directives)) Zend_Cache::throwException('Directives parameter must be an array');
while (list($name, $value) = each($directives)) {
foreach ($directives as $name => $value) {
if (!is_string($name)) {
Zend_Cache::throwException("Incorrect option name : $name");
}
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Config/Yaml.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ protected static function _decodeYaml($currentIndent, &$lines)
{
$config = array();
$inIndent = false;
while (list($n, $line) = each($lines)) {
foreach ($line as $n => $line) {
$lineno = $n + 1;

$line = rtrim(preg_replace("/#.*$/", "", $line));
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Http/UserAgent/Features/Adapter/TeraWurfl.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public static function getAllCapabilities(TeraWurfl $wurflObj)
if (!is_array($group)) {
continue;
}
while (list ($key, $value) = each($group)) {
foreach ($group as $key => $value) {
if (is_bool($value)) {
// to have the same type than the official WURFL API
$features[$key] = ($value ? 'true' : 'false');
Expand Down
Loading

0 comments on commit e6487d5

Please sign in to comment.