summaryrefslogtreecommitdiffstats
path: root/system/libraries/Xmlrpcs.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2017-01-20 14:46:17 +0100
committerAndrey Andreev <narf@devilix.net>2017-01-20 14:46:17 +0100
commit4316a157c27a3721dbfd8a817bf8cbffb1fe371f (patch)
treec8445f076d1552aedcdd003e2645c01f85a4fa24 /system/libraries/Xmlrpcs.php
parent93141a13e77a88be044e4c7f51ba3c2a35bf0ccc (diff)
Don't use each()
Will be deprecated in PHP 7.2
Diffstat (limited to 'system/libraries/Xmlrpcs.php')
-rw-r--r--system/libraries/Xmlrpcs.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/libraries/Xmlrpcs.php b/system/libraries/Xmlrpcs.php
index 21de937c8..0274f13b6 100644
--- a/system/libraries/Xmlrpcs.php
+++ b/system/libraries/Xmlrpcs.php
@@ -584,7 +584,7 @@ class CI_Xmlrpcs extends CI_Xmlrpc {
return $this->multicall_error('nomethod');
}
- list($scalar_type, $scalar_value) = each($methName->me);
+ list($scalar_value, $scalar_type) = array(reset($methName->me), key($methName->me));
$scalar_type = $scalar_type === $this->xmlrpcI4 ? $this->xmlrpcInt : $scalar_type;
if ($methName->kindOf() !== 'scalar' OR $scalar_type !== 'string')
@@ -604,7 +604,7 @@ class CI_Xmlrpcs extends CI_Xmlrpc {
return $this->multicall_error('notarray');
}
- list($a, $b) = each($params->me);
+ list($b, $a) = array(reset($params->me), key($params->me));
$msg = new XML_RPC_Message($scalar_value);
for ($i = 0, $numParams = count($b); $i < $numParams; $i++)