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