Skip to content

Commit c2aef85

Browse files
committed
Replaces logic for the each() function that was deprecated in php 7.2
1 parent b05a7a0 commit c2aef85

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/XML.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ private function xmlToArray($xml, $options = [])
5656
foreach ($xml->children($namespace) as $childXml) {
5757
//recurse into child nodes
5858
$childArray = $this->xmlToArray($childXml, $options);
59-
list($childTagName, $childProperties) = each($childArray);
59+
$childTagName = key($childArray);
60+
$childProperties = current($childArray);
6061
$childTagName = strtolower($childTagName);
6162
//replace characters in tag name
6263
if ($options['keySearch']) {

0 commit comments

Comments
 (0)