Exceptions
Exception
ErrorException
in
src/Controller/PdfGeneratorController.php
(line 65)
);
}
private function imageToBase64($path) {
$path = $path;
$type = pathinfo($path, PATHINFO_EXTENSION);
$data = file_get_contents($path);
$base64 = 'data:image/' . $type . ';base64,' . base64_encode($data);
return $base64;
}
}
$data = [
// 'logo' => $this->imageToBase64($this->getParameter('kernel.project_dir') . '/public/webapic-theme/images/logo-pdf.png'),
// 'coci' => $this->imageToBase64($this->getParameter('kernel.project_dir') . '/public/webapic-theme/images/coccinelle.png'),
'fond' => $this->imageToBase64($this->getParameter('kernel.project_dir') . '/public/webapic-theme/images/pdfcadeau-fond-barcode-date.jpg'),
'name_dest' => 'Jojo',
'name_from' => 'Juju',
'montant' => '4000',
'num' => '0000100000',
'code' => '123321',
in
vendor/symfony/http-kernel/HttpKernel.php
->
carteCadeau
(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;
}
}
$_SERVER['HTTPS'] = 'on';
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
Logs
No log messages
Stack Trace
ErrorException
|
---|
ErrorException: Warning: file_get_contents(/home/ppmcdev/public/webapic-theme/images/pdfcadeau-fond-barcode-date.jpg): Failed to open stream: No such file or directory at src/Controller/PdfGeneratorController.php:65 at App\Controller\PdfGeneratorController->imageToBase64() (src/Controller/PdfGeneratorController.php:25) at App\Controller\PdfGeneratorController->carteCadeau() (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:31) |