ErrorException {#1015 #severity: E_WARNING }
if (0 < $line) { $text .= ' at line '.$line; } if (!file_exists($file)) { return $text; } $link = $this->fileLinkFormat->format($file, $line); return trim($line); } private function formatFileFromText(string $text): string { return preg_replace_callback('/in ("|")?(.+?)\1(?: +(?:on|at))? +line (\d+)/s', fn ($match) => 'in '.$this->formatFile($match[2], $match[3]), $text) ?? $text; } private function formatLogMessage(string $message, array $context): string { if ($context && str_contains($message, '{')) { return trim($line); } private function formatFileFromText(string $text): string { return preg_replace_callback('/in ("|")?(.+?)\1(?: +(?:on|at))? +line (\d+)/s', fn ($match) => 'in '.$this->formatFile($match[2], $match[3]), $text) ?? $text; } private function formatLogMessage(string $message, array $context): string { if ($context && str_contains($message, '{')) {</h2></div></div><div class="exception-message-wrapper"><div class="container"><h1 class="break-long-words exception-message<?= mb_strlen($exceptionMessage) > 180 ? ' long' : ''; ?>"><?= $this->formatFileFromText(nl2br($exceptionMessage)); ?></h1><div class="exception-illustration hidden-xs-down"><?= $this->include('assets/images/symfony-ghost.svg.php'); ?> </div></div> private function include(string $name, array $context = []): string { extract($context, \EXTR_SKIP); ob_start(); include is_file(\dirname(__DIR__).'/Resources/'.$name) ? \dirname(__DIR__).'/Resources/'.$name : $name; return trim(ob_get_clean()); } /**</div></div></header><?php } ?><?= $this->include('views/exception.html.php', $context); ?><script><?= $this->include('assets/js/exception.js'); ?> </script></body> private function include(string $name, array $context = []): string { extract($context, \EXTR_SKIP); ob_start(); include is_file(\dirname(__DIR__).'/Resources/'.$name) ? \dirname(__DIR__).'/Resources/'.$name : $name; return trim(ob_get_clean()); } /** ]); } $exceptionMessage = $this->escape($exception->getMessage()); return $this->include($debugTemplate, [ 'exception' => $exception, 'exceptionMessage' => $exceptionMessage, 'statusText' => $statusText, 'statusCode' => $statusCode, 'logger' => null !== $this->logger && class_exists(DebugLoggerConfigurator::class) ? DebugLoggerConfigurator::getDebugLogger($this->logger) : null, $headers['X-Debug-Exception-File'] = rawurlencode($exception->getFile()).':'.$exception->getLine(); } $exception = FlattenException::createWithDataRepresentation($exception, null, $headers); return $exception->setAsString($this->renderException($exception)); } /** * Gets the HTML content associated with the given exception. */ { $flattenException = FlattenException::createFromThrowable($exception); $debug = \is_bool($this->debug) ? $this->debug : ($this->debug)($flattenException); if ($debug || !$template = $this->findTemplate($flattenException->getStatusCode())) { return $this->fallbackErrorRenderer->render($exception); } return $flattenException->setAsString($this->twig->render($template, [ 'exception' => $flattenException, 'status_code' => $flattenException->getStatusCode(), $flattenException->setAsString($this->serializer->serialize($flattenException, $format, [ 'exception' => $exception, 'debug' => $debug, ])); } catch (NotEncodableValueException) { $flattenException = $this->fallbackErrorRenderer->render($exception); } return $flattenException->setHeaders($flattenException->getHeaders() + $headers); } ) { } public function __invoke(\Throwable $exception): Response { $exception = $this->errorRenderer->render($exception); return new Response($exception->getAsString(), $exception->getStatusCode(), $exception->getHeaders()); } public function preview(Request $request, int $code): Response $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, $event); $this->dispatcher->dispatch($event, KernelEvents::VIEW); $request->headers->set('X-Php-Ob-Level', (string) ob_get_level()); $this->requestStack->push($request); $response = null; try { return $response = $this->handleRaw($request, $type); } catch (\Throwable $e) { if ($e instanceof \Error && !$this->handleAllThrowables) { throw $e; } } $request = $this->duplicateRequest($throwable, $event->getRequest()); try { $response = $event->getKernel()->handle($request, HttpKernelInterface::SUB_REQUEST, false); } catch (\Exception $e) { $f = FlattenException::createFromThrowable($e); $this->logException($e, \sprintf('Exception thrown when handling an exception (%s: %s at %s line %s)', $f->getClass(), $f->getMessage(), basename($e->getFile()), $e->getLine())); $this->priority ??= $dispatcher->getListenerPriority($eventName, $this->listener); $e = $this->stopwatch->start($this->name, 'event_listener'); try { ($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher); } finally { if ($e->isStarted()) { $e->stop(); } } foreach ($listeners as $listener) { if ($stoppable && $event->isPropagationStopped()) { break; } $listener($event, $eventName, $this); } } /** * Sorts the internal list of listeners for the given event by priority. } else { $listeners = $this->getListeners($eventName); } if ($listeners) { $this->callListeners($listeners, $eventName, $event); } return $event; } try { $this->beforeDispatch($eventName, $event); try { $e = $this->stopwatch->start($eventName, 'section'); try { $this->dispatcher->dispatch($event, $eventName); } finally { if ($e->isStarted()) { $e->stop(); } } * Handles a throwable by trying to convert it to a Response. */ private function handleThrowable(\Throwable $e, Request $request, int $type): Response { $event = new ExceptionEvent($this, $request, $type, $e, isKernelTerminating: $this->terminating); $this->dispatcher->dispatch($event, KernelEvents::EXCEPTION); // a listener might have replaced the exception $e = $event->getThrowable(); if (!$event->hasResponse()) { $this->finishRequest($request, $type); throw $e; } return $response = $this->handleThrowable($e, $request, $type); } finally { $this->requestStack->pop(); if ($response instanceof StreamedResponse && $callback = $response->getCallback()) { $requestStack = $this->requestStack; $this->boot(); ++$this->requestStackSize; $this->resetServices = true; try { return $this->getHttpKernel()->handle($request, $type, $catch); } finally { --$this->requestStackSize; } } ) { } public function run(): int { $response = $this->kernel->handle($this->request); if (Kernel::VERSION_ID >= 60400) { $response->send(false); if (\function_exists('fastcgi_finish_request') && !$this->debug) {$app = $app(...$args);exit( $runtime ->getRunner($app) ->run());<?phpuse App\Kernel;require_once dirname(__DIR__).'/vendor/autoload_runtime.php';return function (array $context) { return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);};An exception has been thrown during the rendering of a template ("Invalid URL: scheme is missing in "/states/sensor.agence_web_ldiro_battery". Did you forget to add "http(s)://"?") in "screen/tesla.html.twig" at line 12.
ErrorException {#1287 #severity: E_WARNING }
if (0 < $line) { $text .= ' at line '.$line; } if (!file_exists($file)) { return $text; } $link = $this->fileLinkFormat->format($file, $line);<?php if ($trace['file']) { ?> <?php $lineNumber = $trace['line'] ?: 1; $fileLink = $this->fileLinkFormat->format($trace['file'], $lineNumber); $filePath = strtr(strip_tags($this->formatFile($trace['file'], $lineNumber)), [' at line '.$lineNumber => '']); $filePathParts = explode(\DIRECTORY_SEPARATOR, $filePath); ?> <span class="block trace-file-path">in<a href="<?= $fileLink; ?>"> private function include(string $name, array $context = []): string { extract($context, \EXTR_SKIP); ob_start(); include is_file(\dirname(__DIR__).'/Resources/'.$name) ? \dirname(__DIR__).'/Resources/'.$name : $name; return trim(ob_get_clean()); } /** $displayCodeSnippet = $isFirstUserCode && !$isVendorTrace; if ($displayCodeSnippet) { $isFirstUserCode = false; } ?> <div class="trace-line <?= $isVendorTrace ? 'trace-from-vendor' : ''; ?>"><?= $this->include('views/trace.html.php', [ 'prefix' => $index, 'i' => $i, 'trace' => $trace, 'style' => $isVendorTrace ? 'compact' : ($displayCodeSnippet ? 'expanded' : ''), ]); ?> private function include(string $name, array $context = []): string { extract($context, \EXTR_SKIP); ob_start(); include is_file(\dirname(__DIR__).'/Resources/'.$name) ? \dirname(__DIR__).'/Resources/'.$name : $name; return trim(ob_get_clean()); } /** </h3><div class="tab-content"><?php foreach ($exceptionAsArray as $i => $e) { echo $this->include('views/traces.html.php', [ 'exception' => $e, 'index' => $i + 1, 'expand' => in_array($i, $exceptionWithUserCode, true) || ([] === $exceptionWithUserCode && 0 === $i), ]); } private function include(string $name, array $context = []): string { extract($context, \EXTR_SKIP); ob_start(); include is_file(\dirname(__DIR__).'/Resources/'.$name) ? \dirname(__DIR__).'/Resources/'.$name : $name; return trim(ob_get_clean()); } /**</div></div></header><?php } ?><?= $this->include('views/exception.html.php', $context); ?><script><?= $this->include('assets/js/exception.js'); ?> </script></body> private function include(string $name, array $context = []): string { extract($context, \EXTR_SKIP); ob_start(); include is_file(\dirname(__DIR__).'/Resources/'.$name) ? \dirname(__DIR__).'/Resources/'.$name : $name; return trim(ob_get_clean()); } /** ]); } $exceptionMessage = $this->escape($exception->getMessage()); return $this->include($debugTemplate, [ 'exception' => $exception, 'exceptionMessage' => $exceptionMessage, 'statusText' => $statusText, 'statusCode' => $statusCode, 'logger' => null !== $this->logger && class_exists(DebugLoggerConfigurator::class) ? DebugLoggerConfigurator::getDebugLogger($this->logger) : null, $headers['X-Debug-Exception-File'] = rawurlencode($exception->getFile()).':'.$exception->getLine(); } $exception = FlattenException::createWithDataRepresentation($exception, null, $headers); return $exception->setAsString($this->renderException($exception)); } /** * Gets the HTML content associated with the given exception. */ { $flattenException = FlattenException::createFromThrowable($exception); $debug = \is_bool($this->debug) ? $this->debug : ($this->debug)($flattenException); if ($debug || !$template = $this->findTemplate($flattenException->getStatusCode())) { return $this->fallbackErrorRenderer->render($exception); } return $flattenException->setAsString($this->twig->render($template, [ 'exception' => $flattenException, 'status_code' => $flattenException->getStatusCode(), $flattenException->setAsString($this->serializer->serialize($flattenException, $format, [ 'exception' => $exception, 'debug' => $debug, ])); } catch (NotEncodableValueException) { $flattenException = $this->fallbackErrorRenderer->render($exception); } return $flattenException->setHeaders($flattenException->getHeaders() + $headers); } ) { } public function __invoke(\Throwable $exception): Response { $exception = $this->errorRenderer->render($exception); return new Response($exception->getAsString(), $exception->getStatusCode(), $exception->getHeaders()); } public function preview(Request $request, int $code): Response $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, $event); $this->dispatcher->dispatch($event, KernelEvents::VIEW); $request->headers->set('X-Php-Ob-Level', (string) ob_get_level()); $this->requestStack->push($request); $response = null; try { return $response = $this->handleRaw($request, $type); } catch (\Throwable $e) { if ($e instanceof \Error && !$this->handleAllThrowables) { throw $e; } } $request = $this->duplicateRequest($throwable, $event->getRequest()); try { $response = $event->getKernel()->handle($request, HttpKernelInterface::SUB_REQUEST, false); } catch (\Exception $e) { $f = FlattenException::createFromThrowable($e); $this->logException($e, \sprintf('Exception thrown when handling an exception (%s: %s at %s line %s)', $f->getClass(), $f->getMessage(), basename($e->getFile()), $e->getLine())); $this->priority ??= $dispatcher->getListenerPriority($eventName, $this->listener); $e = $this->stopwatch->start($this->name, 'event_listener'); try { ($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher); } finally { if ($e->isStarted()) { $e->stop(); } } foreach ($listeners as $listener) { if ($stoppable && $event->isPropagationStopped()) { break; } $listener($event, $eventName, $this); } } /** * Sorts the internal list of listeners for the given event by priority. } else { $listeners = $this->getListeners($eventName); } if ($listeners) { $this->callListeners($listeners, $eventName, $event); } return $event; } try { $this->beforeDispatch($eventName, $event); try { $e = $this->stopwatch->start($eventName, 'section'); try { $this->dispatcher->dispatch($event, $eventName); } finally { if ($e->isStarted()) { $e->stop(); } } * Handles a throwable by trying to convert it to a Response. */ private function handleThrowable(\Throwable $e, Request $request, int $type): Response { $event = new ExceptionEvent($this, $request, $type, $e, isKernelTerminating: $this->terminating); $this->dispatcher->dispatch($event, KernelEvents::EXCEPTION); // a listener might have replaced the exception $e = $event->getThrowable(); if (!$event->hasResponse()) { if ($pop = $request !== $this->requestStack->getMainRequest()) { $this->requestStack->push($request); } try { $response = $this->handleThrowable($exception, $request, self::MAIN_REQUEST); } finally { if ($pop) { $this->requestStack->pop(); } } if ($hasRun) { throw $e; } $hasRun = true; $kernel->terminateWithException($e, $request); }; } } elseif ($event instanceof ConsoleEvent && $app = $event->getCommand()->getApplication()) { $output = $event->getOutput(); if ($output instanceof ConsoleOutputInterface) { $this->exceptionHandler = null; } try { if (null !== $exceptionHandler) { $exceptionHandler($exception); return; } $handlerException ??= $exception; } catch (\Throwable $handlerException) {Warning: file_exists(): open_basedir restriction in effect. File(/states/sensor.agence_web_ldiro_battery&quot;. Did you forget to add &quot;http(s)://&quot;?&quot;) in &quot;screen/tesla.html.twig) is not within the allowed path(s): (/var/www/vhosts/ldiro-softwares.dev/:/tmp/)
if (0 < $line) { $text .= ' at line '.$line; } if (!file_exists($file)) { return $text; } $link = $this->fileLinkFormat->format($file, $line); return trim($line); } private function formatFileFromText(string $text): string { return preg_replace_callback('/in ("|")?(.+?)\1(?: +(?:on|at))? +line (\d+)/s', fn ($match) => 'in '.$this->formatFile($match[2], $match[3]), $text) ?? $text; } private function formatLogMessage(string $message, array $context): string { if ($context && str_contains($message, '{')) { return trim($line); } private function formatFileFromText(string $text): string { return preg_replace_callback('/in ("|")?(.+?)\1(?: +(?:on|at))? +line (\d+)/s', fn ($match) => 'in '.$this->formatFile($match[2], $match[3]), $text) ?? $text; } private function formatLogMessage(string $message, array $context): string { if ($context && str_contains($message, '{')) {</h2></div></div><div class="exception-message-wrapper"><div class="container"><h1 class="break-long-words exception-message<?= mb_strlen($exceptionMessage) > 180 ? ' long' : ''; ?>"><?= $this->formatFileFromText(nl2br($exceptionMessage)); ?></h1><div class="exception-illustration hidden-xs-down"><?= $this->include('assets/images/symfony-ghost.svg.php'); ?> </div></div> private function include(string $name, array $context = []): string { extract($context, \EXTR_SKIP); ob_start(); include is_file(\dirname(__DIR__).'/Resources/'.$name) ? \dirname(__DIR__).'/Resources/'.$name : $name; return trim(ob_get_clean()); } /**</div></div></header><?php } ?><?= $this->include('views/exception.html.php', $context); ?><script><?= $this->include('assets/js/exception.js'); ?> </script></body> private function include(string $name, array $context = []): string { extract($context, \EXTR_SKIP); ob_start(); include is_file(\dirname(__DIR__).'/Resources/'.$name) ? \dirname(__DIR__).'/Resources/'.$name : $name; return trim(ob_get_clean()); } /** ]); } $exceptionMessage = $this->escape($exception->getMessage()); return $this->include($debugTemplate, [ 'exception' => $exception, 'exceptionMessage' => $exceptionMessage, 'statusText' => $statusText, 'statusCode' => $statusCode, 'logger' => null !== $this->logger && class_exists(DebugLoggerConfigurator::class) ? DebugLoggerConfigurator::getDebugLogger($this->logger) : null, $headers['X-Debug-Exception-File'] = rawurlencode($exception->getFile()).':'.$exception->getLine(); } $exception = FlattenException::createWithDataRepresentation($exception, null, $headers); return $exception->setAsString($this->renderException($exception)); } /** * Gets the HTML content associated with the given exception. */ { $flattenException = FlattenException::createFromThrowable($exception); $debug = \is_bool($this->debug) ? $this->debug : ($this->debug)($flattenException); if ($debug || !$template = $this->findTemplate($flattenException->getStatusCode())) { return $this->fallbackErrorRenderer->render($exception); } return $flattenException->setAsString($this->twig->render($template, [ 'exception' => $flattenException, 'status_code' => $flattenException->getStatusCode(), $flattenException->setAsString($this->serializer->serialize($flattenException, $format, [ 'exception' => $exception, 'debug' => $debug, ])); } catch (NotEncodableValueException) { $flattenException = $this->fallbackErrorRenderer->render($exception); } return $flattenException->setHeaders($flattenException->getHeaders() + $headers); } ) { } public function __invoke(\Throwable $exception): Response { $exception = $this->errorRenderer->render($exception); return new Response($exception->getAsString(), $exception->getStatusCode(), $exception->getHeaders()); } public function preview(Request $request, int $code): Response $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, $event); $this->dispatcher->dispatch($event, KernelEvents::VIEW); $request->headers->set('X-Php-Ob-Level', (string) ob_get_level()); $this->requestStack->push($request); $response = null; try { return $response = $this->handleRaw($request, $type); } catch (\Throwable $e) { if ($e instanceof \Error && !$this->handleAllThrowables) { throw $e; } } $request = $this->duplicateRequest($throwable, $event->getRequest()); try { $response = $event->getKernel()->handle($request, HttpKernelInterface::SUB_REQUEST, false); } catch (\Exception $e) { $f = FlattenException::createFromThrowable($e); $this->logException($e, \sprintf('Exception thrown when handling an exception (%s: %s at %s line %s)', $f->getClass(), $f->getMessage(), basename($e->getFile()), $e->getLine())); $this->priority ??= $dispatcher->getListenerPriority($eventName, $this->listener); $e = $this->stopwatch->start($this->name, 'event_listener'); try { ($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher); } finally { if ($e->isStarted()) { $e->stop(); } } foreach ($listeners as $listener) { if ($stoppable && $event->isPropagationStopped()) { break; } $listener($event, $eventName, $this); } } /** * Sorts the internal list of listeners for the given event by priority. } else { $listeners = $this->getListeners($eventName); } if ($listeners) { $this->callListeners($listeners, $eventName, $event); } return $event; } try { $this->beforeDispatch($eventName, $event); try { $e = $this->stopwatch->start($eventName, 'section'); try { $this->dispatcher->dispatch($event, $eventName); } finally { if ($e->isStarted()) { $e->stop(); } } * Handles a throwable by trying to convert it to a Response. */ private function handleThrowable(\Throwable $e, Request $request, int $type): Response { $event = new ExceptionEvent($this, $request, $type, $e, isKernelTerminating: $this->terminating); $this->dispatcher->dispatch($event, KernelEvents::EXCEPTION); // a listener might have replaced the exception $e = $event->getThrowable(); if (!$event->hasResponse()) { $this->finishRequest($request, $type); throw $e; } return $response = $this->handleThrowable($e, $request, $type); } finally { $this->requestStack->pop(); if ($response instanceof StreamedResponse && $callback = $response->getCallback()) { $requestStack = $this->requestStack; $this->boot(); ++$this->requestStackSize; $this->resetServices = true; try { return $this->getHttpKernel()->handle($request, $type, $catch); } finally { --$this->requestStackSize; } } ) { } public function run(): int { $response = $this->kernel->handle($this->request); if (Kernel::VERSION_ID >= 60400) { $response->send(false); if (\function_exists('fastcgi_finish_request') && !$this->debug) {$app = $app(...$args);exit( $runtime ->getRunner($app) ->run());<?phpuse App\Kernel;require_once dirname(__DIR__).'/vendor/autoload_runtime.php';return function (array $context) { return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);};An exception has been thrown during the rendering of a template ("Invalid URL: scheme is missing in "/states/sensor.agence_web_ldiro_battery". Did you forget to add "http(s)://"?") in "screen/tesla.html.twig" at line 12.