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

Commit 3049251

Browse files
committed
Add PHP 7.2 support
1 parent 96f323f commit 3049251

File tree

5 files changed

+17
-9
lines changed

5 files changed

+17
-9
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 ($lines 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');

library/Zend/Rest/Route.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,12 +236,14 @@ public function match($request, $partial = false)
236236
/**
237237
* Assembles user submitted parameters forming a URL path defined by this route
238238
*
239-
* @param array $data An array of variable and value pairs used as parameters
240-
* @param bool $reset Weither to reset the current params
241-
* @param bool $encode Weither to return urlencoded string
239+
* @param array $data An array of variable and value pairs used as parameters
240+
* @param bool $reset Weither to reset the current params
241+
* @param bool $encode Weither to return urlencoded string
242+
* @param bool $partial
243+
*
242244
* @return string Route path with user submitted parameters
243245
*/
244-
public function assemble($data = array(), $reset = false, $encode = true)
246+
public function assemble($data = array(), $reset = false, $encode = true, $partial = false)
245247
{
246248
if (!$this->_keysSet) {
247249
if (null === $this->_request) {

library/Zend/XmlRpc/Value.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,13 +486,19 @@ protected static function _createSimpleXMLElement(&$xml)
486486
*/
487487
protected static function _extractTypeAndValue(SimpleXMLElement $xml, &$type, &$value)
488488
{
489-
list($type, $value) = each($xml);
489+
foreach ($xml as $type => $value) {
490+
$type = $value;
491+
$value = $value;
492+
}
490493

491494
if (!$type and $value === null) {
492495
$namespaces = array('ex' => 'http://ws.apache.org/xmlrpc/namespaces/extensions');
493496
foreach ($namespaces as $namespaceName => $namespaceUri) {
494497
$namespaceXml = $xml->children($namespaceUri);
495-
list($type, $value) = each($namespaceXml);
498+
foreach ($namespaceXml as $type => $value) {
499+
$type = $value;
500+
$value = $value;
501+
}
496502
if ($type !== null) {
497503
$type = $namespaceName . ':' . $type;
498504
break;

0 commit comments

Comments
 (0)