Fix Database::fetch_array

pull/4190/head
Angel Fernando Quiroz Campos 3 years ago
parent 33a8ca3dee
commit d671bb3288
  1. 15
      public/main/inc/lib/database.lib.php

@ -218,14 +218,13 @@ class Database
return [];
}
$i = 0;
$return = $data;
foreach ($data as $value) {
$data[$i] = $value;
$i++;
$return[] = $value;
}
return $data;
return $return;
}
/**
@ -297,7 +296,13 @@ class Database
if ($resource->rowCount() > 0) {
$result = $resource->fetchAllAssociative();
return $result[$row][$field];
$resultRow = $result[$row];
foreach ($result[$row] as $value) {
$resultRow[] = $value;
}
return $resultRow;
}
return false;

Loading…
Cancel
Save