From 3a4f8bd06b146ce8aadcb472dc2d72dd18595b98 Mon Sep 17 00:00:00 2001 From: scarl555 Date: Sat, 7 Apr 2018 10:09:54 +0200 Subject: [PATCH] replace deprecated function each() is DEPRECATED since PHP 7.2.0. --- Yubico.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);