Skip to content

Instantly share code, notes, and snippets.

@loquace loquace/Stack Trace
Last active Apr 20, 2018

Embed
What would you like to do?
Symfony\Component\Debug\Exception\FatalThrowableError:
Type error: Argument 1 passed to Doctrine\Common\Collections\ArrayCollection::__construct() must be of the type array, object given, called in /home/seb/Projets/exercice1b/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php on line 633
at vendor/doctrine/collections/lib/Doctrine/Common/Collections/ArrayCollection.php:53
at Doctrine\Common\Collections\ArrayCollection->__construct(object(Orders))
(vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:633)
at Doctrine\ORM\UnitOfWork->computeChangeSet(object(ClassMetadata), object(Products))
(vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:479)
at Doctrine\ORM\UnitOfWork->computeScheduleInsertsChangeSets()
(vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:794)
at Doctrine\ORM\UnitOfWork->computeChangeSets()
(vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:341)
at Doctrine\ORM\UnitOfWork->commit(null)
(vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:358)
at Doctrine\ORM\EntityManager->flush()
(src/Controller/OrdersController.php:91)
at App\Controller\OrdersController->addProducts(object(Request), object(Orders))
(vendor/symfony/http-kernel/HttpKernel.php:149)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
(vendor/symfony/http-kernel/HttpKernel.php:66)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
(vendor/symfony/http-kernel/Kernel.php:190)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(public/index.php:37)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.