diff --git a/Yubico.php b/Yubico.php index 308b8e1..c80bfb4 100644 --- a/Yubico.php +++ b/Yubico.php @@ -387,7 +387,7 @@ function verify($token, $use_timestamp=null, $wait_for_all=False, /* Case 2. Verify signature first */ $rows = explode("\r\n", trim($str)); $response=array(); - while (list($key, $val) = each($rows)) { + foreach((array)$rows as $val){ /* = is also used in BASE64 encoding so we only replace the first = by # which is not used in BASE64 */ $val = preg_replace('/=/', '#', $val, 1); $row = explode("#", $val);