diff --git a/book/doctrine.rst b/book/doctrine.rst index 8859cc2a9f4..871695ff21d 100644 --- a/book/doctrine.rst +++ b/book/doctrine.rst @@ -747,8 +747,8 @@ normal ``Query`` object, which can be used to get the result of the query. (``:price`` in the example above) as it prevents SQL injection attacks. The ``getResult()`` method returns an array of results. To get only one -result, you can use ``getSingleResult()`` (which throws exception there is no -result) or ``getOneOrNullResult()``:: +result, you can use ``getSingleResult()`` (which throws an exception if there +is no result) or ``getOneOrNullResult()``:: $product = $query->getOneOrNullResult();