Commit b5c2925c authored by Bas de Nooijer's avatar Bas de Nooijer

Move count outside loop

parent e57c15f1
...@@ -59,8 +59,9 @@ abstract class AbstractResponseParser ...@@ -59,8 +59,9 @@ abstract class AbstractResponseParser
// key counter to convert values to arrays when keys are re-used // key counter to convert values to arrays when keys are re-used
$keys = array(); $keys = array();
$dataCount = count($data);
$result = array(); $result = array();
for ($i = 0; $i < count($data); $i += 2) { for ($i = 0; $i < $dataCount; $i += 2) {
$key = $data[$i]; $key = $data[$i];
$value = $data[$i+1]; $value = $data[$i+1];
if (array_key_exists($key, $keys)) { if (array_key_exists($key, $keys)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment