Replaced most each() calls with foreach() in preparation to support php 8

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO
2022-01-19 15:40:42 +01:00
parent 7aec4647a5
commit 7a66346036
22 changed files with 47 additions and 45 deletions

View File

@ -53,7 +53,7 @@ class MySQL {
$R = $s->fetchAll(PDO::FETCH_ASSOC);
while(list ($k, $v) = each($R)){
foreach($R as $k => $v) {
$data[$i] = $v;
$i++;
}

View File

@ -47,7 +47,7 @@ class Sphinx {
$R = $s->fetchAll();
while(list ($k, $v) = each($R)){
foreach($R as $k => $v) {
$data[$i] = $v;
$i++;
}
@ -72,7 +72,7 @@ class Sphinx {
$meta->execute();
$R = $meta->fetchAll();
while(list ($k, $v) = each($R)){
foreach($R as $k => $v) {
if($v[0] == "total_found") { $query->total_found = $v[1]; }
}

View File

@ -47,7 +47,7 @@ class SQLite {
$R = $s->fetchAll();
while(list ($k, $v) = each($R)){
foreach($R as $k => $v) {
$data[$i] = $v;
$i++;
}