Remove unnecessary test from DbConnection

This commit is contained in:
Alex Cabal 2024-04-29 14:36:18 -05:00
parent 6a3a5d5ec3
commit aa8bdfed0e

View file

@ -153,7 +153,10 @@ class DbConnection{
do{
try{
$columnCount = $handle->columnCount();
if($columnCount > 0){
if($columnCount == 0){
continue;
}
$metadata = [];
@ -168,10 +171,6 @@ class DbConnection{
$rows = $handle->fetchAll(\PDO::FETCH_NUM);
if(!is_array($rows)){
continue;
}
foreach($rows as $row){
$object = new $class();
@ -250,7 +249,6 @@ class DbConnection{
$result[] = $object;
}
}
}
catch(\PDOException $ex){
// HY000 is thrown when there is no result set, e.g. for an update operation.
// If anything besides that is thrown, then send it up the stack
@ -258,7 +256,8 @@ class DbConnection{
throw $ex;
}
}
}while($handle->nextRowset());
}
while($handle->nextRowset());
return $result;
}