Symfony Exception

ContextErrorException

HTTP 500 Internal Server Error

Notice: A non well formed numeric value encountered

Exception

Symfony\Component\Debug\Exception\ ContextErrorException

  1.                     $this->amount[$key]['today']->till '00:00';
  2.                 $timeFrom explode(':'$this->amount[$key]['today']->from);
  3.                 $timeTill explode(':'$this->amount[$key]['today']->till);
  4.                 if (is_numeric($timeFrom[0])) {
  5.                     $timefromFinal = (new \DateTime())->setTime($timeFrom[0], isset($timeFrom[1]) ? $timeFrom[1] : '00');
  6.                     if (is_numeric($timeTill[0]) && is_numeric($timeTill[1])) {
  7.                         $timefromTill $timeTill[0] < $timeFrom[0] ? (new \DateTime())->modify('+ 1 day')->setTime($timeTill[0], isset($timeTill[1]) ? $timeTill[1] : '00') : (new \DateTime())->setTime($timeTill[0], isset($timeTill[1]) ? $timeTill[1] : '00');
  8.                     } else
  9.                         $timefromTill = (new \DateTime())->modify('+ 1 day')->setTime(0000);
  1.     public function execute(): void
  2.     {
  3.         parent::execute();
  4.         $this->loadTemplate();
  5.         $this->getData();
  6.         $this->parse();
  7.     }
  8.     private function buildPaginationConfig($numberOfItems): array
  9.     {
Index->execute() in src/Web/Core/Engine/Block/ExtraInterface.php (line 57)
  1.         if (!is_callable([$this->object'execute'])) {
  2.             throw new WebException('The action file should contain a callable method "execute".');
  3.         }
  4.         $this->object->execute();
  5.         $this->setOverwrite($this->object->getOverwrite());
  6.         if ($this->object->getTemplatePath() !== null) {
  7.             $this->setTemplatePath($this->object->getTemplatePath());
  8.         }
ExtraInterface->execute() in src/Web/Core/Engine/Page.php (line 345)
  1.             }
  2.             return $parsedBlock;
  3.         }
  4.         $block['extra']->execute();
  5.         $extraVariables $block['extra']->getTemplate()->getAssignedVariables();
  6.         $block['extra']->getTemplate()->assignArray($mainVariables);
  7.         $block['extra']->getTemplate()->assignArray($extraVariables);
  8.         return [
Page->parseBlock(array('extra' => object(ExtraInterface)), array()) in src/Web/Core/Engine/Page.php (line 270)
  1.     {
  2.         $positions = [];
  3.         $mainVariables $this->template->getAssignedVariables();
  4.         foreach ($this->record['positions'] as $position => $blocks) {
  5.             foreach ($blocks as $i => $block) {
  6.                 $positions[$position][$i] = $this->parseBlock($block$mainVariables);
  7.             }
  8.             $this->template->assign('position' . \SpoonFilter::ucfirst($position), $positions[$position]);
  9.         }
  10.         $category '';
  11.         if (!empty($this->url->getParameter(1)))
Page->parsePositions() in src/Web/Core/Engine/Page.php (line 145)
  1.                 'cookieBarHide',
  2.                 !$this->get('icebird.settings')->get('Core''show_cookie_bar'false)
  3.                 || $this->getContainer()->get('icebird.cookie')->hasHiddenCookieBar()
  4.             );
  5.             $this->parsePositions();
  6.             $unusedPositions array_diff(
  7.                 $this->record['template_data']['names'],
  8.                 array_keys($this->record['positions'])
  9.             );
  10.             foreach ($unusedPositions as $position) {
Page->display() in src/Web/Core/Engine/Web.php (line 15)
  1. {
  2.     private $page;
  3.     public function display(): Response
  4.     {
  5.         return $this->page->display();
  6.     }
  7.     public function initialize(): void
  8.     {
  9.         new Url($this->getKernel());
Web->display() in app/IcebirdController.php (line 74)
  1.         $application->passContainerToModels();
  2.         try {
  3.             $application->initialize();
  4.             return $application->display();
  5.         } catch (RedirectException $ex) {
  6.             return $ex->getResponse();
  7.         } catch (Twig_Error $twigError) {
  8.             if ($twigError->getPrevious() instanceof RedirectException) {
  9.                 return $twigError->getPrevious()->getResponse();
IcebirdController->handleApplication(object(Web)) in app/IcebirdController.php (line 56)
  1.         defined('APPLICATION') || define('APPLICATION''Web');
  2.         $applicationClass $this->initializeWeb('Web');
  3.         $application = new $applicationClass($this->container->get('kernel'));
  4.         return $this->handleApplication($application);
  5.     }
  6.     public function webAjaxController(): Response
  7.     {
  8.         defined('APPLICATION') || define('APPLICATION''Web');
IcebirdController->webController() in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php (line 151)
  1.         $this->dispatcher->dispatch(KernelEvents::CONTROLLER_ARGUMENTS$event);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response = \call_user_func_array($controller$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new GetResponseForControllerResultEvent($this$request$type$response);
  9.             $this->dispatcher->dispatch(KernelEvents::VIEW$event);
HttpKernel->handleRaw(object(Request), 1) in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php (line 68)
  1.     public function handle(Request $request$type HttpKernelInterface::MASTER_REQUEST$catch true)
  2.     {
  3.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
HttpKernel->handle(object(Request), 1, true) in app/Kernel.php (line 35)
  1.     }
  2.     public function handle(Request $request$type HttpKernelInterface::MASTER_REQUEST$catch true): Response
  3.     {
  4.         $this->boot();
  5.         return $this->getHttpKernel()->handle($request$type$catch);
  6.     }
  7.     public function boot(): void
  8.     {
  9.         if ($this->booted) {
  10.             return;
Kernel->handle(object(Request)) in /index.php (line 58)
  1. if ($debug) {
  2.     Debug::enable();
  3. }
  4. $kernel = new AppKernel($env$debug);
  5. $response $kernel->handle($request);
  6. if ($response->getCharset() === null && $kernel->getContainer() instanceof ContainerInterface) {
  7.     $response->setCharset(
  8.         $kernel->getContainer()->getParameter('kernel.charset')
  9.     );
  10. }

Logs

No log messages

Stack Trace

ContextErrorException

Symfony\Component\Debug\Exception\ContextErrorException:
Notice: A non well formed numeric value encountered

  at src/Web/Modules/Advertisement/Controller/Index.php:144
  at Web\Modules\Advertisement\Controller\Index->getData()
     (src/Web/Modules/Advertisement/Controller/Index.php:29)
  at Web\Modules\Advertisement\Controller\Index->execute()
     (src/Web/Core/Engine/Block/ExtraInterface.php:57)
  at Web\Core\Engine\Block\ExtraInterface->execute()
     (src/Web/Core/Engine/Page.php:345)
  at Web\Core\Engine\Page->parseBlock(array('extra' => object(ExtraInterface)), array())
     (src/Web/Core/Engine/Page.php:270)
  at Web\Core\Engine\Page->parsePositions()
     (src/Web/Core/Engine/Page.php:145)
  at Web\Core\Engine\Page->display()
     (src/Web/Core/Engine/Web.php:15)
  at Web\Core\Engine\Web->display()
     (app/IcebirdController.php:74)
  at IcebirdCMS\App\IcebirdController->handleApplication(object(Web))
     (app/IcebirdController.php:56)
  at IcebirdCMS\App\IcebirdController->webController()
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (app/Kernel.php:35)
  at IcebirdCMS\App\Kernel->handle(object(Request))
     (index.php:58)