getSingleScalarResult() returns NULL when the query yields no results
`NoResultException` is not thrown in this case.
This commit is contained in:
parent
22b5fb1ad4
commit
3ce833fb62
@ -796,7 +796,7 @@ abstract class AbstractQuery
|
|||||||
* @return mixed
|
* @return mixed
|
||||||
*
|
*
|
||||||
* @throws NonUniqueResultException If the query result is not unique.
|
* @throws NonUniqueResultException If the query result is not unique.
|
||||||
* @throws NoResultException If the query returned no result.
|
* @throws NoResultException If the query returned no result and hydration mode is not HYDRATE_SINGLE_SCALAR.
|
||||||
*/
|
*/
|
||||||
public function getSingleResult($hydrationMode = null)
|
public function getSingleResult($hydrationMode = null)
|
||||||
{
|
{
|
||||||
@ -822,10 +822,9 @@ abstract class AbstractQuery
|
|||||||
*
|
*
|
||||||
* Alias for getSingleResult(HYDRATE_SINGLE_SCALAR).
|
* Alias for getSingleResult(HYDRATE_SINGLE_SCALAR).
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed The scalar result, or NULL if the query returned no result.
|
||||||
*
|
*
|
||||||
* @throws NonUniqueResultException If the query result is not unique.
|
* @throws NonUniqueResultException If the query result is not unique.
|
||||||
* @throws NoResultException If the query returned no result.
|
|
||||||
*/
|
*/
|
||||||
public function getSingleScalarResult()
|
public function getSingleScalarResult()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user