Commit a354bb94 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

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

parent 1690aaa0
Loading
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -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;
    }

    /**