Exceptions
Exception
Doctrine\ORM\ NonUniqueResultException
in
vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php
(line 967)
if (! is_array($result)) {
return $result;
}
if (count($result) > 1) {
throw new NonUniqueResultException();
}
return array_shift($result);
}
->andWhere('d.file_type != :file_type')
->setParameter('id', $ig->getId())
->setParameter('name', 'INFOGRAFIK')
->setParameter('file_type', 'pdf')
->getQuery()
->getOneOrNullResult();
if ($dok) {
$icons[$ig->getId()] = $dok->getPath();
}
else {
in
vendor/symfony/http-kernel/HttpKernel.php
->
index
(line 163)
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = $controller(...$arguments);
// view
if (!$response instanceof Response) {
$event = new ViewEvent($this, $request, $type, $response);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleRaw
(line 75)
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
$this->requestStack->push($request);
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 202)
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
Debug::enable();
}
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
Stack Trace
NonUniqueResultException
|
---|
Doctrine\ORM\NonUniqueResultException: More than one result was found for query although one row or none was expected. at vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:967 at Doctrine\ORM\AbstractQuery->getOneOrNullResult() (src/Controller/Frontend/PublikasiController.php:51) at App\Controller\Frontend\PublikasiController->index() (vendor/symfony/http-kernel/HttpKernel.php:163) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:75) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:202) at Symfony\Component\HttpKernel\Kernel->handle() (public/index.php:20) |