$dstSize => $dstFile,
'title' => $srcFile['title'][$_SESSION['current']['locale']]
]);
} else {
if ($srcIm === False) {
$srcIm = new \Imagick($srcFile['path']);
$srcSizeTmp = $srcIm->getImageGeometry();
$srcSize = $srcSizeTmp['width']."x".$srcSizeTmp['height'];
}
list($srcWidth, $srcHeight) = explode('x', $srcSize);
list($dstWidth, $dstHeight) = explode('x', $dstSize);
$dstSize => $dstFile,
'title' => $srcFile['title'][$_SESSION['current']['locale']]
]);
} else {
if ($srcIm === False) {
$srcIm = new \Imagick($srcFile['path']);
$srcSizeTmp = $srcIm->getImageGeometry();
$srcSize = $srcSizeTmp['width']."x".$srcSizeTmp['height'];
}
list($srcWidth, $srcHeight) = explode('x', $srcSize);
list($dstWidth, $dstHeight) = explode('x', $dstSize);
$mapSizes = ['original', '800x800', '300x300'];
if ($_SERVER['SERVER_NAME'] == 'visimo.local')
$photosSizes = $mapSizes;
$mandate->initFilesInMandate('mainPhoto', $photosSizes, False, 'position');
$mandate->initFilesInMandate('photo', $photosSizes, False, 'position');
$mandate->initFilesInMandate('map', $mapSizes, False, 'position');
/**
* @Route("/{type}/{id}/{title}", name="mandate")
*/
public function mandate($type, int $id, $title): Response
{
$mandate = $this->visimoService->simplified->getMandate($id);
$menus = $this->visimoService->getMenus();
$texts = $this->visimoService->translations->getCurrentPage();
$area = $this->visimoService->areas->getCurrentArea();
return $this->render('mandate.html.twig', ['mandate' => $mandate, 'menus' => $menus, 'googlemaps_key' => 'AIzaSyDxCcXapo0pEsJ8s15Zh_gUIvdN5-xN8ow', 'area_class' => $area['ar_class'], 'texts'=>$texts]);
}
$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);
public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true)
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
$this->request = $request;
}
public function run(): int
{
$response = $this->kernel->handle($this->request);
$response->send();
if ($this->kernel instanceof TerminableInterface) {
$this->kernel->terminate($this->request, $response);
}
$app = $app(...$args);
exit(
$runtime
->getRunner($app)
->run()
);
<?php
use App\Kernel;
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
return function (array $context) {
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
};
No log messages
ImagickException
|
---|
ImagickException: unable to open image `/home/topfloor.fr/vhosts/www/core/storage/properties//mainPhoto/c/e/9/a/original/ce9ae4ee91a97b7a6af3111a21749745.jpg': No such file or directory @ error/blob.c/OpenBlob/2874 at src/Services/Visimo/bot_custom/mandates.inc.php:223 at Imagick->__construct() (src/Services/Visimo/bot_custom/mandates.inc.php:223) at App\Services\Visimo\mandate->initFilesInMandate() (src/Services/Visimo/VisimoServiceSimplified.php:46) at App\Services\Visimo\VisimoServiceSimplified->getMandate() (src/Controller/RootController.php:123) at App\Controller\RootController->mandate() (vendor/symfony/http-kernel/HttpKernel.php:156) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:78) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:199) at Symfony\Component\HttpKernel\Kernel->handle() (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:37) at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run() (vendor/autoload_runtime.php:35) at require_once('/home/visimo.fr/vhosts/www/visimo-website/vendor/autoload_runtime.php') (public/index.php:5) |