mirror of
https://github.com/standardebooks/web.git
synced 2025-07-06 23:00:28 -04:00
Remove unnecessary test from DbConnection
This commit is contained in:
parent
6a3a5d5ec3
commit
aa8bdfed0e
1 changed files with 76 additions and 77 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue