A
A
Alexander2017-03-02 19:07:37
Doctrine ORM
Alexander, 2017-03-02 19:07:37

Why does ->setParameter() call an exception in Simfony?

I do

$q = $em->createQuery('select u from AppUrlShortenerBundle:Urls u where u.id > 2');

Everything is working.
I do:
$q = $em->createQuery('select u from AppUrlShortenerBundle:Urls u where u.id > :abc')->setParametr('abc', 2);

Returns:
FatalErrorException: Error: Uncaught TypeError: Argument 1 passed to Symfony\Component\Debug\ExceptionHandler::handle() must be an instance of Exception? instance of Error given in /var/www/html/Symfony/vendors/symfony/symfony/src/Symfony/Component/Debug/ExceptionHandler.php line 71
:((

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2017-03-02
@esisl

Woblin must be such an enchanting woodpecker! :)))
Thank you. Closed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question