$this->amount[$key]['today']->till = '00:00';
$timeFrom = explode(':', $this->amount[$key]['today']->from);
$timeTill = explode(':', $this->amount[$key]['today']->till);
if (is_numeric($timeFrom[0])) {
$timefromFinal = (new \DateTime())->setTime($timeFrom[0], isset($timeFrom[1]) ? $timeFrom[1] : '00');
if (is_numeric($timeTill[0]) && is_numeric($timeTill[1])) {
$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');
} else
$timefromTill = (new \DateTime())->modify('+ 1 day')->setTime(00, 00);
if (!is_callable([$this->object, 'execute'])) {
throw new WebException('The action file should contain a callable method "execute".');
}
$this->object->execute();
$this->setOverwrite($this->object->getOverwrite());
if ($this->object->getTemplatePath() !== null) {
$this->setTemplatePath($this->object->getTemplatePath());
}
{
$positions = [];
$mainVariables = $this->template->getAssignedVariables();
foreach ($this->record['positions'] as $position => $blocks) {
foreach ($blocks as $i => $block) {
$positions[$position][$i] = $this->parseBlock($block, $mainVariables);
}
$this->template->assign('position' . \SpoonFilter::ucfirst($position), $positions[$position]);
}
$category = '';
if (!empty($this->url->getParameter(1)))
'cookieBarHide',
!$this->get('icebird.settings')->get('Core', 'show_cookie_bar', false)
|| $this->getContainer()->get('icebird.cookie')->hasHiddenCookieBar()
);
$this->parsePositions();
$unusedPositions = array_diff(
$this->record['template_data']['names'],
array_keys($this->record['positions'])
);
foreach ($unusedPositions as $position) {
$application->passContainerToModels();
try {
$application->initialize();
return $application->display();
} catch (RedirectException $ex) {
return $ex->getResponse();
} catch (Twig_Error $twigError) {
if ($twigError->getPrevious() instanceof RedirectException) {
return $twigError->getPrevious()->getResponse();
defined('APPLICATION') || define('APPLICATION', 'Web');
$applicationClass = $this->initializeWeb('Web');
$application = new $applicationClass($this->container->get('kernel'));
return $this->handleApplication($application);
}
public function webAjaxController(): Response
{
defined('APPLICATION') || define('APPLICATION', 'Web');
$this->dispatcher->dispatch(KernelEvents::CONTROLLER_ARGUMENTS, $event);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = \call_user_func_array($controller, $arguments);
// view
if (!$response instanceof Response) {
$event = new GetResponseForControllerResultEvent($this, $request, $type, $response);
$this->dispatcher->dispatch(KernelEvents::VIEW, $event);
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $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) {
No log messages
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) |