Skip to content
Snippets Groups Projects
Commit a354bb94 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

[FIX] ->rowCount() ne fonctionne qu'après ->fetch()

parent 1690aaa0
Branches
Tags
No related merge requests found
Pipeline #9930 passed
......@@ -89,11 +89,7 @@ class QueryExecutor
{
$statement = $this->executeQuery($sql, $connection);
if ($statement->rowCount() === 0) {
return null;
}
return $statement->fetch(\PDO::FETCH_ASSOC);
return $statement->fetch(\PDO::FETCH_ASSOC) ?: null;
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment