Twig \ Error \ RuntimeError
An exception has been thrown during the rendering of a template ("Undefined property: DateTime::$date").
Previous exceptions
  • Undefined property: DateTime::$date (2)
Twig\Error\RuntimeError thrown with message "An exception has been thrown during the rendering of a template ("Undefined property: DateTime::$date")." Stacktrace: #44 Twig\Error\RuntimeError in /home/cookqozi/public_html/src/Page/views/search.twig:45 #43 Whoops\Exception\ErrorException in /home/cookqozi/public_html/vendor/twig/twig/src/Extension/CoreExtension.php:1555 #42 Whoops\Run:handleError in /home/cookqozi/public_html/vendor/twig/twig/src/Extension/CoreExtension.php:1555 #41 twig_get_attribute in /home/cookqozi/public_html/tmp/views/5f/5f7d3d2f1e4650c72fe87750094834eb.php:185 #40 __TwigTemplate_20f4002f8a4291b4f26d9e85cbb68830:block_content in /home/cookqozi/public_html/vendor/twig/twig/src/Template.php:171 #39 Twig\Template:displayBlock in /home/cookqozi/public_html/tmp/views/f7/f7dd10ac70f34f2f101e1c084c530e1c.php:62 #38 __TwigTemplate_fe1f950f46d5ddc74f62e8afd2041f89:doDisplay in /home/cookqozi/public_html/vendor/twig/twig/src/Template.php:394 #37 Twig\Template:displayWithErrorHandling in /home/cookqozi/public_html/vendor/twig/twig/src/Template.php:367 #36 Twig\Template:display in /home/cookqozi/public_html/tmp/views/5f/5f7d3d2f1e4650c72fe87750094834eb.php:47 #35 __TwigTemplate_20f4002f8a4291b4f26d9e85cbb68830:doDisplay in /home/cookqozi/public_html/vendor/twig/twig/src/Template.php:394 #34 Twig\Template:displayWithErrorHandling in /home/cookqozi/public_html/vendor/twig/twig/src/Template.php:367 #33 Twig\Template:display in /home/cookqozi/public_html/vendor/twig/twig/src/Template.php:379 #32 Twig\Template:render in /home/cookqozi/public_html/vendor/twig/twig/src/TemplateWrapper.php:40 #31 Twig\TemplateWrapper:render in /home/cookqozi/public_html/vendor/twig/twig/src/Environment.php:280 #30 Twig\Environment:render in /home/cookqozi/public_html/src/Framework/Renderer/TwigRenderer.php:36 #29 Framework\Renderer\TwigRenderer:render in /home/cookqozi/public_html/src/Page/Actions/SearchAction.php:61 #28 App\Page\Actions\SearchAction:__invoke in /home/cookqozi/public_html/src/Framework/Middleware/CombinedMiddlewareDelegate.php:49 #27 call_user_func_array in /home/cookqozi/public_html/src/Framework/Middleware/CombinedMiddlewareDelegate.php:49 #26 Framework\Middleware\CombinedMiddlewareDelegate:handle in /home/cookqozi/public_html/src/Framework/Middleware/CombinedMiddleware.php:38 #25 Framework\Middleware\CombinedMiddleware:process in /home/cookqozi/public_html/src/Framework/Middleware/DispatcherMiddleware.php:36 #24 Framework\Middleware\DispatcherMiddleware:process in /home/cookqozi/public_html/src/Framework/Middleware/CombinedMiddlewareDelegate.php:56 #23 Framework\Middleware\CombinedMiddlewareDelegate:handle in /home/cookqozi/public_html/src/Framework/Middleware/RouterMiddleware.php:39 #22 Framework\Middleware\RouterMiddleware:process in /home/cookqozi/public_html/src/Framework/Middleware/CombinedMiddlewareDelegate.php:56 #21 Framework\Middleware\CombinedMiddlewareDelegate:handle in /home/cookqozi/public_html/src/Framework/Middleware/CsrfMiddleware.php:68 #20 Framework\Middleware\CsrfMiddleware:process in /home/cookqozi/public_html/src/Framework/Middleware/CombinedMiddlewareDelegate.php:56 #19 Framework\Middleware\CombinedMiddlewareDelegate:handle in /home/cookqozi/public_html/src/Framework/Middleware/ForbiddenCsrfMiddleware.php:35 #18 Framework\Middleware\ForbiddenCsrfMiddleware:process in /home/cookqozi/public_html/src/Framework/Middleware/CombinedMiddlewareDelegate.php:56 #17 Framework\Middleware\CombinedMiddlewareDelegate:handle in /home/cookqozi/public_html/src/Framework/Middleware/RendererRequestMiddleware.php:35 #16 Framework\Middleware\RendererRequestMiddleware:process in /home/cookqozi/public_html/src/Framework/Middleware/CombinedMiddlewareDelegate.php:56 #15 Framework\Middleware\CombinedMiddlewareDelegate:handle in /home/cookqozi/public_html/src/Framework/Middleware/MethodMiddleware.php:22 #14 Framework\Middleware\MethodMiddleware:process in /home/cookqozi/public_html/src/Framework/Middleware/CombinedMiddlewareDelegate.php:56 #13 Framework\Middleware\CombinedMiddlewareDelegate:handle in /home/cookqozi/public_html/src/Framework/Middleware/RoutePrefixedMiddleware.php:51 #12 Framework\Middleware\RoutePrefixedMiddleware:process in /home/cookqozi/public_html/src/Framework/Middleware/CombinedMiddlewareDelegate.php:56 #11 Framework\Middleware\CombinedMiddlewareDelegate:handle in /home/cookqozi/public_html/src/Framework/Middleware/ForbiddenMiddleware.php:59 #10 Framework\Middleware\ForbiddenMiddleware:process in /home/cookqozi/public_html/src/Framework/Middleware/CombinedMiddlewareDelegate.php:56 #9 Framework\Middleware\CombinedMiddlewareDelegate:handle in /home/cookqozi/public_html/src/Framework/Middleware/TrackerMiddleware.php:47 #8 Framework\Middleware\TrackerMiddleware:process in /home/cookqozi/public_html/src/Framework/Middleware/CombinedMiddlewareDelegate.php:56 #7 Framework\Middleware\CombinedMiddlewareDelegate:handle in /home/cookqozi/public_html/src/Framework/Middleware/TrailingSlashMiddleware.php:22 #6 Framework\Middleware\TrailingSlashMiddleware:process in /home/cookqozi/public_html/src/Framework/Middleware/CombinedMiddlewareDelegate.php:56 #5 Framework\Middleware\CombinedMiddlewareDelegate:handle in /home/cookqozi/public_html/vendor/middlewares/whoops/src/Whoops.php:104 #4 Middlewares\Whoops:process in /home/cookqozi/public_html/src/Framework/Middleware/CombinedMiddlewareDelegate.php:56 #3 Framework\Middleware\CombinedMiddlewareDelegate:handle in /home/cookqozi/public_html/src/Framework/Middleware/CombinedMiddleware.php:38 #2 Framework\Middleware\CombinedMiddleware:process in /home/cookqozi/public_html/src/Framework/App.php:99 #1 Framework\App:handle in /home/cookqozi/public_html/src/Framework/App.php:107 #0 Framework\App:run in /home/cookqozi/public_html/webroot/index.php:89
Stack frames (45)
44
Twig\Error\RuntimeError
/src/Page/views/search.twig45
43
Whoops\Exception\ErrorException
/vendor/twig/twig/src/Extension/CoreExtension.php1555
42
Whoops\Run handleError
/vendor/twig/twig/src/Extension/CoreExtension.php1555
41
twig_get_attribute
/tmp/views/5f/5f7d3d2f1e4650c72fe87750094834eb.php185
40
__TwigTemplate_20f4002f8a4291b4f26d9e85cbb68830 block_content
/vendor/twig/twig/src/Template.php171
39
Twig\Template displayBlock
/tmp/views/f7/f7dd10ac70f34f2f101e1c084c530e1c.php62
38
__TwigTemplate_fe1f950f46d5ddc74f62e8afd2041f89 doDisplay
/vendor/twig/twig/src/Template.php394
37
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php367
36
Twig\Template display
/tmp/views/5f/5f7d3d2f1e4650c72fe87750094834eb.php47
35
__TwigTemplate_20f4002f8a4291b4f26d9e85cbb68830 doDisplay
/vendor/twig/twig/src/Template.php394
34
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php367
33
Twig\Template display
/vendor/twig/twig/src/Template.php379
32
Twig\Template render
/vendor/twig/twig/src/TemplateWrapper.php40
31
Twig\TemplateWrapper render
/vendor/twig/twig/src/Environment.php280
30
Twig\Environment render
/src/Framework/Renderer/TwigRenderer.php36
29
Framework\Renderer\TwigRenderer render
/src/Page/Actions/SearchAction.php61
28
App\Page\Actions\SearchAction __invoke
/src/Framework/Middleware/CombinedMiddlewareDelegate.php49
27
call_user_func_array
/src/Framework/Middleware/CombinedMiddlewareDelegate.php49
26
Framework\Middleware\CombinedMiddlewareDelegate handle
/src/Framework/Middleware/CombinedMiddleware.php38
25
Framework\Middleware\CombinedMiddleware process
/src/Framework/Middleware/DispatcherMiddleware.php36
24
Framework\Middleware\DispatcherMiddleware process
/src/Framework/Middleware/CombinedMiddlewareDelegate.php56
23
Framework\Middleware\CombinedMiddlewareDelegate handle
/src/Framework/Middleware/RouterMiddleware.php39
22
Framework\Middleware\RouterMiddleware process
/src/Framework/Middleware/CombinedMiddlewareDelegate.php56
21
Framework\Middleware\CombinedMiddlewareDelegate handle
/src/Framework/Middleware/CsrfMiddleware.php68
20
Framework\Middleware\CsrfMiddleware process
/src/Framework/Middleware/CombinedMiddlewareDelegate.php56
19
Framework\Middleware\CombinedMiddlewareDelegate handle
/src/Framework/Middleware/ForbiddenCsrfMiddleware.php35
18
Framework\Middleware\ForbiddenCsrfMiddleware process
/src/Framework/Middleware/CombinedMiddlewareDelegate.php56
17
Framework\Middleware\CombinedMiddlewareDelegate handle
/src/Framework/Middleware/RendererRequestMiddleware.php35
16
Framework\Middleware\RendererRequestMiddleware process
/src/Framework/Middleware/CombinedMiddlewareDelegate.php56
15
Framework\Middleware\CombinedMiddlewareDelegate handle
/src/Framework/Middleware/MethodMiddleware.php22
14
Framework\Middleware\MethodMiddleware process
/src/Framework/Middleware/CombinedMiddlewareDelegate.php56
13
Framework\Middleware\CombinedMiddlewareDelegate handle
/src/Framework/Middleware/RoutePrefixedMiddleware.php51
12
Framework\Middleware\RoutePrefixedMiddleware process
/src/Framework/Middleware/CombinedMiddlewareDelegate.php56
11
Framework\Middleware\CombinedMiddlewareDelegate handle
/src/Framework/Middleware/ForbiddenMiddleware.php59
10
Framework\Middleware\ForbiddenMiddleware process
/src/Framework/Middleware/CombinedMiddlewareDelegate.php56
9
Framework\Middleware\CombinedMiddlewareDelegate handle
/src/Framework/Middleware/TrackerMiddleware.php47
8
Framework\Middleware\TrackerMiddleware process
/src/Framework/Middleware/CombinedMiddlewareDelegate.php56
7
Framework\Middleware\CombinedMiddlewareDelegate handle
/src/Framework/Middleware/TrailingSlashMiddleware.php22
6
Framework\Middleware\TrailingSlashMiddleware process
/src/Framework/Middleware/CombinedMiddlewareDelegate.php56
5
Framework\Middleware\CombinedMiddlewareDelegate handle
/vendor/middlewares/whoops/src/Whoops.php104
4
Middlewares\Whoops process
/src/Framework/Middleware/CombinedMiddlewareDelegate.php56
3
Framework\Middleware\CombinedMiddlewareDelegate handle
/src/Framework/Middleware/CombinedMiddleware.php38
2
Framework\Middleware\CombinedMiddleware process
/src/Framework/App.php99
1
Framework\App handle
/src/Framework/App.php107
0
Framework\App run
/webroot/index.php89
/home/cookqozi/public_html/src/Page/views/search.twig
                {% endfor %}
                {% if P > 0 %} {% for searchP in searchPost %}
                    <div class="search-result-post">
                        <div class="row">
                            <div class="col-md-12 noStyle">
                                <span class="pull-left"><a href="{{ path('blog.show', {slug: searchP.slug}) }}">{{ searchP.name | toTags(search.q) }}</a></span><span class="comment-action-link pull-right"><i class="icon icon-comment-o"></i> {{ searchP.nbComments | default("0") }} {{ trad('_COMMENTS') }}</span>
                                <p class="spacetop30">{{ searchP.content | excerpt(250) | toTags(search.q) }}</p>
                            </div>
                            <div class="col-md-12 tags">
                                {% set tags = searchP.tags | split(',') %}
                                {% set i = 0 %}
                                {% for tag in tags %}
                                    {% if i == 10 %}{% set i = 1 %}{% else %}{% set i = i + 1 %}{% endif %}
                                    <span class="price-tag tags-color{{ i }}"><a href="{{ url('search?q='~ tag) }}">{{ tag }}</a></span>
                                {% endfor %}
                            </div>
                        </div>
                        <section class="comments">
                            <div class="col-md-12 noStyle">        
                                <span class="comment-date pull-left" title="{{ searchP.created.date }}">{{ searchP.created | ago }}</span>
                                <p><a class="alink pull-right" href="{{ path('blog.show', {slug: searchP.slug}) }}">{{ trad('_SAVOIRPLUS') }}</a></p>
                            </div>
                            <div class="col-md-12 noStyle"><hr></div>
                        </section>
                    </div>
                {% endfor %} {% endif %}
                {% endif %}
                {{ paginate('search', search.total, search.pageCurrent, search.page, '', {'q' : search.q}) }}
            <!-- end: SEARCH RESULT -->
        </div>
        <div class="col-md-12 hidden">
            <p>{{ trad('_KEYSEARCHTEAM1') }}</p>
            <p>{{ trad('_KEYSEARCHTEAM2') }}</p>
        </div>
    </div></div>
</div></section>
{% endblock %}
 
/home/cookqozi/public_html/vendor/twig/twig/src/Extension/CoreExtension.php
 
        throw new RuntimeError($message, $lineno, $source);
    }
 
    if ($object instanceof Template) {
        throw new RuntimeError('Accessing \Twig\Template attributes is forbidden.', $lineno, $source);
    }
 
    // object property
    if (/* Template::METHOD_CALL */ 'method' !== $type) {
        if (isset($object->$item) || \array_key_exists((string) $item, (array) $object)) {
            if ($isDefinedTest) {
                return true;
            }
 
            if ($sandboxed) {
                $env->getExtension(SandboxExtension::class)->checkPropertyAllowed($object, $item, $lineno, $source);
            }
 
            return $object->$item;
        }
    }
 
    static $cache = [];
 
    $class = \get_class($object);
 
    // object method
    // precedence: getXxx() > isXxx() > hasXxx()
    if (!isset($cache[$class])) {
        $methods = get_class_methods($object);
        sort($methods);
        $lcMethods = array_map(function ($value) { return strtr($value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); }, $methods);
        $classCache = [];
        foreach ($methods as $i => $method) {
            $classCache[$method] = $method;
            $classCache[$lcName = $lcMethods[$i]] = $method;
 
            if ('g' === $lcName[0] && 0 === strpos($lcName, 'get')) {
                $name = substr($method, 3);
Exception message: Undefined property: DateTime::$date
/home/cookqozi/public_html/vendor/twig/twig/src/Extension/CoreExtension.php
 
        throw new RuntimeError($message, $lineno, $source);
    }
 
    if ($object instanceof Template) {
        throw new RuntimeError('Accessing \Twig\Template attributes is forbidden.', $lineno, $source);
    }
 
    // object property
    if (/* Template::METHOD_CALL */ 'method' !== $type) {
        if (isset($object->$item) || \array_key_exists((string) $item, (array) $object)) {
            if ($isDefinedTest) {
                return true;
            }
 
            if ($sandboxed) {
                $env->getExtension(SandboxExtension::class)->checkPropertyAllowed($object, $item, $lineno, $source);
            }
 
            return $object->$item;
        }
    }
 
    static $cache = [];
 
    $class = \get_class($object);
 
    // object method
    // precedence: getXxx() > isXxx() > hasXxx()
    if (!isset($cache[$class])) {
        $methods = get_class_methods($object);
        sort($methods);
        $lcMethods = array_map(function ($value) { return strtr($value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); }, $methods);
        $classCache = [];
        foreach ($methods as $i => $method) {
            $classCache[$method] = $method;
            $classCache[$lcName = $lcMethods[$i]] = $method;
 
            if ('g' === $lcName[0] && 0 === strpos($lcName, 'get')) {
                $name = substr($method, 3);
/home/cookqozi/public_html/tmp/views/5f/5f7d3d2f1e4650c72fe87750094834eb.php
                        echo "\t\t\t\t\t\t\t\t\t<span class=\"price-tag tags-color";
                        echo twig_escape_filter($this->env, ($context["i"] ?? null), "html", null, true);
                        echo "\"><a href=\"";
                        echo twig_escape_filter($this->env, $this->extensions['Framework\Twig\RouterTwigExtension']->urlFor(("search?q=" . $context["tag"])), "html", null, true);
                        echo "\">";
                        echo twig_escape_filter($this->env, $context["tag"], "html", null, true);
                        echo "</a></span>
\t\t\t\t\t\t\t\t";
                    }
                    $_parent = $context['_parent'];
                    unset($context['_seq'], $context['_iterated'], $context['_key'], $context['tag'], $context['_parent'], $context['loop']);
                    $context = array_intersect_key($context, $_parent) + $_parent;
                    // line 41
                    echo "\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<section class=\"comments\">
\t\t\t\t\t\t\t<div class=\"col-md-12 noStyle\">\t\t
\t\t\t\t\t\t\t\t<span class=\"comment-date pull-left\" title=\"";
                    // line 45
                    echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["searchP"], "created", [], "any", false, false, false, 45), "date", [], "any", false, false, false, 45), "html", null, true);
                    echo "\">";
                    echo $this->extensions['Framework\Twig\TimeExtension']->ago(twig_get_attribute($this->env, $this->source, $context["searchP"], "created", [], "any", false, false, false, 45));
                    echo "</span>
\t\t\t\t\t\t\t\t<p><a class=\"alink pull-right\" href=\"";
                    // line 46
                    echo twig_escape_filter($this->env, $this->extensions['Framework\Twig\RouterTwigExtension']->pathFor("blog.show", ["slug" => twig_get_attribute($this->env, $this->source, $context["searchP"], "slug", [], "any", false, false, false, 46)]), "html", null, true);
                    echo "\">";
                    echo $this->extensions['Framework\Twig\TextExtension']->toTrad("_SAVOIRPLUS");
                    echo "</a></p>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<div class=\"col-md-12 noStyle\"><hr></div>
\t\t\t\t\t\t</section>
\t\t\t\t\t</div>
\t\t\t\t";
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['_iterated'], $context['_key'], $context['searchP'], $context['_parent'], $context['loop']);
                $context = array_intersect_key($context, $_parent) + $_parent;
                // line 51
                echo " ";
/home/cookqozi/public_html/vendor/twig/twig/src/Template.php
    {
        if ($useBlocks && isset($blocks[$name])) {
            $template = $blocks[$name][0];
            $block = $blocks[$name][1];
        } elseif (isset($this->blocks[$name])) {
            $template = $this->blocks[$name][0];
            $block = $this->blocks[$name][1];
        } else {
            $template = null;
            $block = null;
        }
 
        // avoid RCEs when sandbox is enabled
        if (null !== $template && !$template instanceof self) {
            throw new \LogicException('A block must be a method on a \Twig\Template instance.');
        }
 
        if (null !== $template) {
            try {
                $template->$block($context, $blocks);
            } catch (Error $e) {
                if (!$e->getSourceContext()) {
                    $e->setSourceContext($template->getSourceContext());
                }
 
                // this is mostly useful for \Twig\Error\LoaderError exceptions
                // see \Twig\Error\LoaderError
                if (-1 === $e->getTemplateLine()) {
                    $e->guess();
                }
 
                throw $e;
            } catch (\Exception $e) {
                $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $template->getSourceContext(), $e);
                $e->guess();
 
                throw $e;
            }
        } elseif (false !== $parent = $this->getParent($context)) {
            $parent->displayBlock($name, $context, array_merge($this->blocks, $blocks), false, $templateContext ?? $this);
/home/cookqozi/public_html/tmp/views/f7/f7dd10ac70f34f2f101e1c084c530e1c.php
<html lang=\"";
        // line 2
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["visitor"] ?? null), "lang", [], "any", false, false, false, 2), "html", null, true);
        echo "\">
\t";
        // line 3
        $this->displayBlock('head', $context, $blocks);
        // line 4
        echo "\t<body>
\t\t";
        // line 5
        $this->displayBlock('header', $context, $blocks);
        // line 6
        echo "\t\t<div class=\"content-wrap\">
\t\t\t";
        // line 7
        $this->loadTemplate("flash.twig", "default.twig", 7)->display($context);
        // line 8
        echo "\t\t\t";
        $this->displayBlock('content', $context, $blocks);
        // line 9
        echo "\t\t\t<div class=\"hidden\">";
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["seo"] ?? null), "keyword", [], "any", false, false, false, 9), "html", null, true);
        echo "</div>
\t\t</div>
\t\t";
        // line 11
        $this->displayBlock('footer', $context, $blocks);
        // line 12
        echo "\t\t<!-- ScrollUp button start -->
\t\t<div class=\"scrollup\"><span class=\"go-top\"><i class=\"icon icon-angle-up\"></i></span></div>
\t\t<!-- ScrollUp button end -->
\t\t";
        // line 15
        $this->displayBlock('script', $context, $blocks);
        // line 16
        echo "\t</body>
</html>";
    }
 
/home/cookqozi/public_html/vendor/twig/twig/src/Template.php
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
/home/cookqozi/public_html/vendor/twig/twig/src/Template.php
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
/home/cookqozi/public_html/tmp/views/5f/5f7d3d2f1e4650c72fe87750094834eb.php
            'content' => [$this, 'block_content'],
        ];
    }
 
    protected function doGetParent(array $context)
    {
        // line 3
        return "default.twig";
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 1
        $context["titlePage"] = (($this->extensions['Framework\Twig\TextExtension']->toTrad("_SEARCH") . " : ") . twig_get_attribute($this->env, $this->source, ($context["search"] ?? null), "q", [], "any", false, false, false, 1));
        // line 2
        $context["descriptionPage"] = ((twig_get_attribute($this->env, $this->source, ($context["search"] ?? null), "q", [], "any", false, false, false, 2) . " => ") . $this->extensions['Framework\Twig\TextExtension']->toTrad("_DESDEFAULTSEARCH"));
        // line 3
        $this->parent = $this->loadTemplate("default.twig", "@page/search.twig", 3);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 4
    public function block_content($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 5
        echo "<section class=\"section primary-section\"><div class=\"contain\">
\t<div class=\"content\"><div class=\"row\">
\t\t<div class=\"title centered\">
\t\t\t<h1>";
        // line 8
        echo $this->extensions['Framework\Twig\TextExtension']->toTrad("_SEARCH0");
        echo " ";
        if (twig_get_attribute($this->env, $this->source, ($context["search"] ?? null), "q", [], "any", false, false, false, 8)) {
            echo " ";
            echo twig_escape_filter($this->env, ($this->extensions['Framework\Twig\TextExtension']->toTrad("_SEARCH1") . twig_get_attribute($this->env, $this->source, ($context["search"] ?? null), "q", [], "any", false, false, false, 8)), "html", null, true);
        }
        echo "</h1>
\t\t</div>
/home/cookqozi/public_html/vendor/twig/twig/src/Template.php
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
/home/cookqozi/public_html/vendor/twig/twig/src/Template.php
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
/home/cookqozi/public_html/vendor/twig/twig/src/Template.php
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
/home/cookqozi/public_html/vendor/twig/twig/src/TemplateWrapper.php
    private $env;
    private $template;
 
    /**
     * This method is for internal use only and should never be called
     * directly (use Twig\Environment::load() instead).
     *
     * @internal
     */
    public function __construct(Environment $env, Template $template)
    {
        $this->env = $env;
        $this->template = $template;
    }
 
    public function render(array $context = []): string
    {
        // using func_get_args() allows to not expose the blocks argument
        // as it should only be used by internal code
        return $this->template->render($context, \func_get_args()[1] ?? []);
    }
 
    public function display(array $context = [])
    {
        // using func_get_args() allows to not expose the blocks argument
        // as it should only be used by internal code
        $this->template->display($context, \func_get_args()[1] ?? []);
    }
 
    public function hasBlock(string $name, array $context = []): bool
    {
        return $this->template->hasBlock($name, $context);
    }
 
    /**
     * @return string[] An array of defined template block names
     */
    public function getBlockNames(array $context = []): array
    {
        return $this->template->getBlockNames($context);
/home/cookqozi/public_html/vendor/twig/twig/src/Environment.php
     */
    public function getTemplateClass(string $name, int $index = null): string
    {
        $key = $this->getLoader()->getCacheKey($name).$this->optionsHash;
 
        return $this->templateClassPrefix.hash(\PHP_VERSION_ID < 80100 ? 'sha256' : 'xxh128', $key).(null === $index ? '' : '___'.$index);
    }
 
    /**
     * Renders a template.
     *
     * @param string|TemplateWrapper $name The template name
     *
     * @throws LoaderError  When the template cannot be found
     * @throws SyntaxError  When an error occurred during compilation
     * @throws RuntimeError When an error occurred during rendering
     */
    public function render($name, array $context = []): string
    {
        return $this->load($name)->render($context);
    }
 
    /**
     * Displays a template.
     *
     * @param string|TemplateWrapper $name The template name
     *
     * @throws LoaderError  When the template cannot be found
     * @throws SyntaxError  When an error occurred during compilation
     * @throws RuntimeError When an error occurred during rendering
     */
    public function display($name, array $context = []): void
    {
        $this->load($name)->display($context);
    }
 
    /**
     * Loads a template.
     *
     * @param string|TemplateWrapper $name The template name
/home/cookqozi/public_html/src/Framework/Renderer/TwigRenderer.php
     * @param string $namespace
     * @param string $path
     */
    public function addPath(string $namespace, string $path = ''): void
    {
        $this->twig->getLoader()->addPath($path, $namespace);
    }
 
    /**
     * Permet de rendre une vue
     * Le chemin peut être précisé avec des namespace rajoutés via addPath()
     * $this->render('@blog/view');
     * $this->render('view');
     * @param string $view
     * @param array $params
     * @return string
     */
    public function render(string $view, array $params = []): string
    {
        return $this->twig->render($view . '.twig', $params);
    }
 
    /**
     * Permet de rajouter des variables globales à toutes les vues
     *
     * @param string $key
     * @param mixed $value
     */
    public function addGlobal(string $key, $value): void
    {
        $this->twig->addGlobal($key, $value);
    }
 
    /**
     * @return Twig_Environment
     */
    public function getTwig(): Twig_Environment
    {
        return $this->twig;
    }
/home/cookqozi/public_html/src/Page/Actions/SearchAction.php
        $perPage = 8;
        $pageCurrent = $params['p'] ?? 1;
        $q = $params['q'] ?? '';
        $searchPost = $this->postTable
            ->findSearch($q)
            ->paginate($perPage, $pageCurrent);
        $offset = $pageCurrent * $perPage - $perPage;
        $totalPost = $this->postTable->findSearch($q)->count();
        $total = max($totalPost, 0);
        $page = ceil($total / $perPage);
        $search = [
            'q' => $q,
            'totalPost' => $totalPost,
            'total' => $total,
            'pageCurrent' => $pageCurrent,
            'page' => $page,
        ];
        return $this->renderer->render(
            '@page/search',
            compact('search', 'searchPost')
        );
    }
}
 
/home/cookqozi/public_html/src/Framework/Middleware/CombinedMiddlewareDelegate.php
 
    public function __construct(
        ContainerInterface $container,
        array $middlewares,
        RequestHandlerInterface $handler
    ) {
        $this->middlewares = $middlewares;
        $this->container = $container;
        $this->handler = $handler;
    }
 
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = $this->getMiddleware();
        if (is_null($middleware)) {
            return $this->handler->handle($request);
        } elseif (is_callable($middleware)) {
            $response = call_user_func_array($middleware, [
                $request,
                [$this, 'handle'],
            ]);
            if (is_string($response)) {
                return new Response(200, [], $response);
            }
            return $response;
        } elseif ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, $this);
        }
    }
 
    /**
     * @return object
     */
    private function getMiddleware()
    {
        if (array_key_exists($this->index, $this->middlewares)) {
            if (is_string($this->middlewares[$this->index])) {
                $middleware = $this->container->get(
                    $this->middlewares[$this->index]
                );
/home/cookqozi/public_html/src/Framework/Middleware/CombinedMiddlewareDelegate.php
 
    public function __construct(
        ContainerInterface $container,
        array $middlewares,
        RequestHandlerInterface $handler
    ) {
        $this->middlewares = $middlewares;
        $this->container = $container;
        $this->handler = $handler;
    }
 
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = $this->getMiddleware();
        if (is_null($middleware)) {
            return $this->handler->handle($request);
        } elseif (is_callable($middleware)) {
            $response = call_user_func_array($middleware, [
                $request,
                [$this, 'handle'],
            ]);
            if (is_string($response)) {
                return new Response(200, [], $response);
            }
            return $response;
        } elseif ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, $this);
        }
    }
 
    /**
     * @return object
     */
    private function getMiddleware()
    {
        if (array_key_exists($this->index, $this->middlewares)) {
            if (is_string($this->middlewares[$this->index])) {
                $middleware = $this->container->get(
                    $this->middlewares[$this->index]
                );
/home/cookqozi/public_html/src/Framework/Middleware/CombinedMiddleware.php
    private $middlewares;
 
    public function __construct(
        ContainerInterface $container,
        array $middlewares
    ) {
        $this->container = $container;
        $this->middlewares = $middlewares;
    }
 
    public function process(
        ServerRequestInterface $request,
        RequestHandlerInterface $handler
    ): ResponseInterface {
        $handler = new CombinedMiddlewareDelegate(
            $this->container,
            $this->middlewares,
            $handler
        );
        return $handler->handle($request);
    }
}
 
/home/cookqozi/public_html/src/Framework/Middleware/DispatcherMiddleware.php
 
    public function __construct(ContainerInterface $container)
    {
        $this->container = $container;
    }
 
    public function process(
        ServerRequestInterface $request,
        RequestHandlerInterface $handler
    ): ResponseInterface {
        $route = $request->getAttribute(Route::class);
        if (is_null($route)) {
            return $handler->handle($request);
        }
        $callback = $route->getCallback();
        if (!is_array($callback)) {
            $callback = [$callback];
        }
        return (new CombinedMiddleware($this->container, $callback))->process(
            $request,
            $handler
        );
    }
}
 
/home/cookqozi/public_html/src/Framework/Middleware/CombinedMiddlewareDelegate.php
        $this->container = $container;
        $this->handler = $handler;
    }
 
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = $this->getMiddleware();
        if (is_null($middleware)) {
            return $this->handler->handle($request);
        } elseif (is_callable($middleware)) {
            $response = call_user_func_array($middleware, [
                $request,
                [$this, 'handle'],
            ]);
            if (is_string($response)) {
                return new Response(200, [], $response);
            }
            return $response;
        } elseif ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, $this);
        }
    }
 
    /**
     * @return object
     */
    private function getMiddleware()
    {
        if (array_key_exists($this->index, $this->middlewares)) {
            if (is_string($this->middlewares[$this->index])) {
                $middleware = $this->container->get(
                    $this->middlewares[$this->index]
                );
            } else {
                $middleware = $this->middlewares[$this->index];
            }
            $this->index++;
            return $middleware;
        }
        return null;
/home/cookqozi/public_html/src/Framework/Middleware/RouterMiddleware.php
    }
 
    public function process(
        ServerRequestInterface $request,
        RequestHandlerInterface $handler
    ): ResponseInterface {
        $route = $this->router->match($request);
        if (is_null($route)) {
            return $handler->handle($request);
        }
        $params = $route->getParams();
        $request = array_reduce(
            array_keys($params),
            function ($request, $key) use ($params) {
                return $request->withAttribute($key, $params[$key]);
            },
            $request
        );
        $request = $request->withAttribute(get_class($route), $route);
        return $handler->handle($request);
    }
}
 
/home/cookqozi/public_html/src/Framework/Middleware/CombinedMiddlewareDelegate.php
        $this->container = $container;
        $this->handler = $handler;
    }
 
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = $this->getMiddleware();
        if (is_null($middleware)) {
            return $this->handler->handle($request);
        } elseif (is_callable($middleware)) {
            $response = call_user_func_array($middleware, [
                $request,
                [$this, 'handle'],
            ]);
            if (is_string($response)) {
                return new Response(200, [], $response);
            }
            return $response;
        } elseif ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, $this);
        }
    }
 
    /**
     * @return object
     */
    private function getMiddleware()
    {
        if (array_key_exists($this->index, $this->middlewares)) {
            if (is_string($this->middlewares[$this->index])) {
                $middleware = $this->container->get(
                    $this->middlewares[$this->index]
                );
            } else {
                $middleware = $this->middlewares[$this->index];
            }
            $this->index++;
            return $middleware;
        }
        return null;
/home/cookqozi/public_html/src/Framework/Middleware/CsrfMiddleware.php
        if (in_array($request->getMethod(), ['POST', 'PUT', 'DELETE'])) {
            if ($request->getUri()->getPath() == '/cspReport') {
                return $handler->handle($request);
            }
            $params = $request->getParsedBody() ?: [];
            if (!array_key_exists($this->formKey, $params)) {
                $this->reject();
            } else {
                $csrfList = $this->session[$this->sessionKey] ?? [];
                if (in_array($params[$this->formKey], $csrfList)) {
                    if (!isset($params['ajax'])) {
                        $this->useToken($params[$this->formKey]);
                    }
                    return $handler->handle($request);
                } else {
                    $this->reject();
                }
            }
        } else {
            return $handler->handle($request);
        }
    }
 
    public function generateToken(): string
    {
        $token = bin2hex(random_bytes(16));
        $csrfList = $this->session[$this->sessionKey] ?? [];
        $csrfList[] = $token;
        $this->session[$this->sessionKey] = $csrfList;
        $this->limitTokens();
        return $token;
    }
 
    private function reject(): void
    {
        throw new CsrfInvalidException();
    }
 
    private function useToken($token): void
    {
/home/cookqozi/public_html/src/Framework/Middleware/CombinedMiddlewareDelegate.php
        $this->container = $container;
        $this->handler = $handler;
    }
 
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = $this->getMiddleware();
        if (is_null($middleware)) {
            return $this->handler->handle($request);
        } elseif (is_callable($middleware)) {
            $response = call_user_func_array($middleware, [
                $request,
                [$this, 'handle'],
            ]);
            if (is_string($response)) {
                return new Response(200, [], $response);
            }
            return $response;
        } elseif ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, $this);
        }
    }
 
    /**
     * @return object
     */
    private function getMiddleware()
    {
        if (array_key_exists($this->index, $this->middlewares)) {
            if (is_string($this->middlewares[$this->index])) {
                $middleware = $this->container->get(
                    $this->middlewares[$this->index]
                );
            } else {
                $middleware = $this->middlewares[$this->index];
            }
            $this->index++;
            return $middleware;
        }
        return null;
/home/cookqozi/public_html/src/Framework/Middleware/ForbiddenCsrfMiddleware.php
     */
    private $flashService;
 
    public function __construct(FlashService $flashService)
    {
        $this->flashService = $flashService;
    }
 
    /**
     * @param ServerRequestInterface $request
     * @param RequestHandlerInterface $handler
     * @return ResponseInterface
     * @throws \TypeError
     */
    public function process(
        ServerRequestInterface $request,
        RequestHandlerInterface $handler
    ): ResponseInterface {
        try {
            return $handler->handle($request);
        } catch (CsrfInvalidException $exception) {
            $this->flashService->error(_CSRFINVALID);
            return new RedirectResponse('/');
        } catch (\TypeError $error) {
            throw $error;
        }
    }
}
 
/home/cookqozi/public_html/src/Framework/Middleware/CombinedMiddlewareDelegate.php
        $this->container = $container;
        $this->handler = $handler;
    }
 
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = $this->getMiddleware();
        if (is_null($middleware)) {
            return $this->handler->handle($request);
        } elseif (is_callable($middleware)) {
            $response = call_user_func_array($middleware, [
                $request,
                [$this, 'handle'],
            ]);
            if (is_string($response)) {
                return new Response(200, [], $response);
            }
            return $response;
        } elseif ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, $this);
        }
    }
 
    /**
     * @return object
     */
    private function getMiddleware()
    {
        if (array_key_exists($this->index, $this->middlewares)) {
            if (is_string($this->middlewares[$this->index])) {
                $middleware = $this->container->get(
                    $this->middlewares[$this->index]
                );
            } else {
                $middleware = $this->middlewares[$this->index];
            }
            $this->index++;
            return $middleware;
        }
        return null;
/home/cookqozi/public_html/src/Framework/Middleware/RendererRequestMiddleware.php
 
    public function __construct(RendererInterface $renderer)
    {
        $this->renderer = $renderer;
    }
 
    public function process(
        ServerRequestInterface $request,
        RequestHandlerInterface $handler
    ): ResponseInterface {
        $domain = sprintf(
            '%s://%s%s',
            $request->getUri()->getScheme(),
            $request->getUri()->getHost(),
            $request->getUri()->getPort()
                ? ':' . $request->getUri()->getPort()
                : ''
        );
        $this->renderer->addGlobal('domain', $domain);
        return $handler->handle($request);
    }
}
 
/home/cookqozi/public_html/src/Framework/Middleware/CombinedMiddlewareDelegate.php
        $this->container = $container;
        $this->handler = $handler;
    }
 
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = $this->getMiddleware();
        if (is_null($middleware)) {
            return $this->handler->handle($request);
        } elseif (is_callable($middleware)) {
            $response = call_user_func_array($middleware, [
                $request,
                [$this, 'handle'],
            ]);
            if (is_string($response)) {
                return new Response(200, [], $response);
            }
            return $response;
        } elseif ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, $this);
        }
    }
 
    /**
     * @return object
     */
    private function getMiddleware()
    {
        if (array_key_exists($this->index, $this->middlewares)) {
            if (is_string($this->middlewares[$this->index])) {
                $middleware = $this->container->get(
                    $this->middlewares[$this->index]
                );
            } else {
                $middleware = $this->middlewares[$this->index];
            }
            $this->index++;
            return $middleware;
        }
        return null;
/home/cookqozi/public_html/src/Framework/Middleware/MethodMiddleware.php
 
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\ResponseInterface;
 
class MethodMiddleware implements MiddlewareInterface
{
    public function process(
        ServerRequestInterface $request,
        RequestHandlerInterface $handler
    ): ResponseInterface {
        $parsedBody = $request->getParsedBody();
        if (
            array_key_exists('_method', $parsedBody) &&
            in_array($parsedBody['_method'], ['DELETE', 'PUT'])
        ) {
            $request = $request->withMethod($parsedBody['_method']);
        }
        return $handler->handle($request);
    }
}
 
/home/cookqozi/public_html/src/Framework/Middleware/CombinedMiddlewareDelegate.php
        $this->container = $container;
        $this->handler = $handler;
    }
 
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = $this->getMiddleware();
        if (is_null($middleware)) {
            return $this->handler->handle($request);
        } elseif (is_callable($middleware)) {
            $response = call_user_func_array($middleware, [
                $request,
                [$this, 'handle'],
            ]);
            if (is_string($response)) {
                return new Response(200, [], $response);
            }
            return $response;
        } elseif ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, $this);
        }
    }
 
    /**
     * @return object
     */
    private function getMiddleware()
    {
        if (array_key_exists($this->index, $this->middlewares)) {
            if (is_string($this->middlewares[$this->index])) {
                $middleware = $this->container->get(
                    $this->middlewares[$this->index]
                );
            } else {
                $middleware = $this->middlewares[$this->index];
            }
            $this->index++;
            return $middleware;
        }
        return null;
/home/cookqozi/public_html/src/Framework/Middleware/RoutePrefixedMiddleware.php
        $this->container = $container;
        $this->prefix = $prefix;
        $this->middleware = $middleware;
    }
 
    public function process(
        ServerRequestInterface $request,
        RequestHandlerInterface $handler
    ): ResponseInterface {
        $path = $request->getUri()->getPath();
        if (strpos($path, $this->prefix) === 0) {
            if (is_string($this->middleware)) {
                return $this->container
                    ->get($this->middleware)
                    ->process($request, $handler);
            } else {
                return $this->middleware->process($request, $handler);
            }
        }
        return $handler->handle($request);
    }
}
 
/home/cookqozi/public_html/src/Framework/Middleware/CombinedMiddlewareDelegate.php
        $this->container = $container;
        $this->handler = $handler;
    }
 
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = $this->getMiddleware();
        if (is_null($middleware)) {
            return $this->handler->handle($request);
        } elseif (is_callable($middleware)) {
            $response = call_user_func_array($middleware, [
                $request,
                [$this, 'handle'],
            ]);
            if (is_string($response)) {
                return new Response(200, [], $response);
            }
            return $response;
        } elseif ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, $this);
        }
    }
 
    /**
     * @return object
     */
    private function getMiddleware()
    {
        if (array_key_exists($this->index, $this->middlewares)) {
            if (is_string($this->middlewares[$this->index])) {
                $middleware = $this->container->get(
                    $this->middlewares[$this->index]
                );
            } else {
                $middleware = $this->middlewares[$this->index];
            }
            $this->index++;
            return $middleware;
        }
        return null;
/home/cookqozi/public_html/src/Framework/Middleware/ForbiddenMiddleware.php
    ) {
        $this->adminPrefix = $adminPrefix;
        $this->accountPrefix = $accountPrefix;
        $this->loginPath = $loginPath;
        $this->session = $session;
        $this->auth = $auth;
    }
 
    /**
     * @param ServerRequestInterface $request
     * @param RequestHandlerInterface $handler
     * @return ResponseInterface
     * @throws \TypeError
     */
    public function process(
        ServerRequestInterface $request,
        RequestHandlerInterface $handler
    ): ResponseInterface {
        try {
            return $handler->handle($request);
        } catch (ForbiddenException $exception) {
            return $this->redirectLogin($request);
        } catch (\TypeError $error) {
            if (strpos($error->getMessage(), User::class) !== false) {
                return $this->redirectLogin($request);
            }
            throw $error;
        }
    }
 
    public function redirectLogin(
        ServerRequestInterface $request
    ): ResponseInterface {
        $user = $this->auth->getUser();
        $uri = $request->getUri()->getPath();
        $this->session->set('auth.redirect', $uri);
        $flashService = new FlashService($this->session);
        if ($user === null) {
            $flashService->error(_NOLOG);
            return new RedirectResponse($this->loginPath);
/home/cookqozi/public_html/src/Framework/Middleware/CombinedMiddlewareDelegate.php
        $this->container = $container;
        $this->handler = $handler;
    }
 
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = $this->getMiddleware();
        if (is_null($middleware)) {
            return $this->handler->handle($request);
        } elseif (is_callable($middleware)) {
            $response = call_user_func_array($middleware, [
                $request,
                [$this, 'handle'],
            ]);
            if (is_string($response)) {
                return new Response(200, [], $response);
            }
            return $response;
        } elseif ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, $this);
        }
    }
 
    /**
     * @return object
     */
    private function getMiddleware()
    {
        if (array_key_exists($this->index, $this->middlewares)) {
            if (is_string($this->middlewares[$this->index])) {
                $middleware = $this->container->get(
                    $this->middlewares[$this->index]
                );
            } else {
                $middleware = $this->middlewares[$this->index];
            }
            $this->index++;
            return $middleware;
        }
        return null;
/home/cookqozi/public_html/src/Framework/Middleware/TrackerMiddleware.php
 
    public function __construct(ContainerInterface $container)
    {
        $this->container = $container;
    }
 
    public function process(
        ServerRequestInterface $request,
        RequestHandlerInterface $handler
    ): ResponseInterface {
        $this->session = $this->container->get(SessionInterface::class);
        $this->validSession($this->session);
        $visitor = $this->container->get(Visitor::class);
        $visitor->track(
            $this->session,
            $this->sessionKey,
            $request,
            $this->container
        );
        return $handler->handle($request);
    }
 
    private function validSession($session)
    {
        if (!is_array($session) && !$session instanceof \ArrayAccess) {
            throw new \TypeError(
                tradDynamic([_ERRORMIDDLEWARESESSION], 'Tracker')
            );
        }
    }
}
 
/home/cookqozi/public_html/src/Framework/Middleware/CombinedMiddlewareDelegate.php
        $this->container = $container;
        $this->handler = $handler;
    }
 
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = $this->getMiddleware();
        if (is_null($middleware)) {
            return $this->handler->handle($request);
        } elseif (is_callable($middleware)) {
            $response = call_user_func_array($middleware, [
                $request,
                [$this, 'handle'],
            ]);
            if (is_string($response)) {
                return new Response(200, [], $response);
            }
            return $response;
        } elseif ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, $this);
        }
    }
 
    /**
     * @return object
     */
    private function getMiddleware()
    {
        if (array_key_exists($this->index, $this->middlewares)) {
            if (is_string($this->middlewares[$this->index])) {
                $middleware = $this->container->get(
                    $this->middlewares[$this->index]
                );
            } else {
                $middleware = $this->middlewares[$this->index];
            }
            $this->index++;
            return $middleware;
        }
        return null;
/home/cookqozi/public_html/src/Framework/Middleware/TrailingSlashMiddleware.php
 
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\ResponseInterface;
use GuzzleHttp\Psr7\Response;
 
class TrailingSlashMiddleware implements MiddlewareInterface
{
    public function process(
        ServerRequestInterface $request,
        RequestHandlerInterface $handler
    ): ResponseInterface {
        $uri = $request->getUri()->getPath();
        if (!empty($uri) && $uri !== '/' && $uri[-1] === '/') {
            return (new Response())
                ->withStatus(301)
                ->withHeader('Location', substr($uri, 0, -1));
        }
        return $handler->handle($request);
    }
}
 
/home/cookqozi/public_html/src/Framework/Middleware/CombinedMiddlewareDelegate.php
        $this->container = $container;
        $this->handler = $handler;
    }
 
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = $this->getMiddleware();
        if (is_null($middleware)) {
            return $this->handler->handle($request);
        } elseif (is_callable($middleware)) {
            $response = call_user_func_array($middleware, [
                $request,
                [$this, 'handle'],
            ]);
            if (is_string($response)) {
                return new Response(200, [], $response);
            }
            return $response;
        } elseif ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, $this);
        }
    }
 
    /**
     * @return object
     */
    private function getMiddleware()
    {
        if (array_key_exists($this->index, $this->middlewares)) {
            if (is_string($this->middlewares[$this->index])) {
                $middleware = $this->container->get(
                    $this->middlewares[$this->index]
                );
            } else {
                $middleware = $this->middlewares[$this->index];
            }
            $this->index++;
            return $middleware;
        }
        return null;
/home/cookqozi/public_html/vendor/middlewares/whoops/src/Whoops.php
        $whoops->sendHttpCode(false);
 
        //Catch errors means register whoops globally
        if ($this->catchErrors) {
            $whoops->register();
 
            $shutdown = function () use ($whoops) {
                $whoops->allowQuit(true);
                $whoops->writeToOutput(true);
                $whoops->sendHttpCode(true);
 
                $method = Run::SHUTDOWN_HANDLER;
                $whoops->$method();
            };
 
            register_shutdown_function($shutdown);
        }
 
        try {
            $response = $handler->handle($request);
        } catch (\Throwable $exception) {
            $response = $this->responseFactory->createResponse(500);
            $response->getBody()->write($whoops->$method($exception));
            $response = self::updateResponseContentType($response, $whoops);
        } finally {
            while (ob_get_level() >= $level) {
                ob_end_clean();
            }
        }
 
        if ($this->catchErrors) {
            $whoops->unregister();
        }
 
        return $response;
    }
 
    /**
     * Returns the whoops instance or create one.
     */
/home/cookqozi/public_html/src/Framework/Middleware/CombinedMiddlewareDelegate.php
        $this->container = $container;
        $this->handler = $handler;
    }
 
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = $this->getMiddleware();
        if (is_null($middleware)) {
            return $this->handler->handle($request);
        } elseif (is_callable($middleware)) {
            $response = call_user_func_array($middleware, [
                $request,
                [$this, 'handle'],
            ]);
            if (is_string($response)) {
                return new Response(200, [], $response);
            }
            return $response;
        } elseif ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, $this);
        }
    }
 
    /**
     * @return object
     */
    private function getMiddleware()
    {
        if (array_key_exists($this->index, $this->middlewares)) {
            if (is_string($this->middlewares[$this->index])) {
                $middleware = $this->container->get(
                    $this->middlewares[$this->index]
                );
            } else {
                $middleware = $this->middlewares[$this->index];
            }
            $this->index++;
            return $middleware;
        }
        return null;
/home/cookqozi/public_html/src/Framework/Middleware/CombinedMiddleware.php
    private $middlewares;
 
    public function __construct(
        ContainerInterface $container,
        array $middlewares
    ) {
        $this->container = $container;
        $this->middlewares = $middlewares;
    }
 
    public function process(
        ServerRequestInterface $request,
        RequestHandlerInterface $handler
    ): ResponseInterface {
        $handler = new CombinedMiddlewareDelegate(
            $this->container,
            $this->middlewares,
            $handler
        );
        return $handler->handle($request);
    }
}
 
/home/cookqozi/public_html/src/Framework/App.php
            $this->middlewares[] = new RoutePrefixedMiddleware(
                $this->getContainer(),
                $routePrefix,
                $middleware
            );
        }
        return $this;
    }
 
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $this->index++;
        if ($this->index > 1) {
            throw new \Exception();
        }
        $middleware = new CombinedMiddleware(
            $this->getContainer(),
            $this->middlewares
        );
        return $middleware->process($request, $this);
    }
 
    public function run(ServerRequestInterface $request): ResponseInterface
    {
        foreach ($this->modules as $module) {
            $this->getContainer()->get($module);
        }
        return $this->handle($request);
    }
 
    /**
     * @return ContainerInterface
     */
    public function getContainer(): ContainerInterface
    {
        if ($this->container === null) {
            $builder = new ContainerBuilder();
            $env = getenv('ENV') ?: 'production';
            switch ($env) {
                case 'development':
/home/cookqozi/public_html/src/Framework/App.php
 
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $this->index++;
        if ($this->index > 1) {
            throw new \Exception();
        }
        $middleware = new CombinedMiddleware(
            $this->getContainer(),
            $this->middlewares
        );
        return $middleware->process($request, $this);
    }
 
    public function run(ServerRequestInterface $request): ResponseInterface
    {
        foreach ($this->modules as $module) {
            $this->getContainer()->get($module);
        }
        return $this->handle($request);
    }
 
    /**
     * @return ContainerInterface
     */
    public function getContainer(): ContainerInterface
    {
        if ($this->container === null) {
            $builder = new ContainerBuilder();
            $env = getenv('ENV') ?: 'production';
            switch ($env) {
                case 'development':
                case 'staging':
                    break;
 
                case 'testing':
                case 'production':
                    if (version_compare(PHP_VERSION, '5.3', '>=')) {
                        error_reporting(
                            E_ALL &
/home/cookqozi/public_html/webroot/index.php
$container->get(Router::class)->get('/', IndexAction::class, 'home');
$app
    ->pipe(Whoops::class)
    ->pipe(TrailingSlashMiddleware::class)
    ->pipe(TrackerMiddleware::class)
    ->pipe(ForbiddenMiddleware::class)
    ->pipe(
        $container->get('admin.prefix'),
        $container->get(RoleMiddlewareFactory::class)->makeForRole('admin')
    )
    ->pipe(MethodMiddleware::class)
    ->pipe(RendererRequestMiddleware::class)
    ->pipe(ForbiddenCsrfMiddleware::class)
    ->pipe(CsrfMiddleware::class)
    ->pipe(RouterMiddleware::class)
    ->pipe(DispatcherMiddleware::class)
    ->pipe(NotFoundMiddleware::class);
 
if (php_sapi_name() !== 'cli') {
    $response = $app->run(ServerRequest::fromGlobals());
    send($response);
}
 
/**
 * Send an HTTP response
 *
 * @return void
 */
function send(ResponseInterface $response)
{
    $http_line = sprintf(
        'HTTP/%s %s %s',
        $response->getProtocolVersion(),
        $response->getStatusCode(),
        $response->getReasonPhrase()
    );
 
    header($http_line, true, $response->getStatusCode());
 
    foreach ($response->getHeaders() as $name => $values) {

Environment & details:

Key Value
q sur-mesure
empty
empty
empty
empty
Key Value
PATH /usr/local/bin:/usr/bin:/bin
TEMP /tmp
TMP /tmp
TMPDIR /tmp
PWD /
HTTP_ACCEPT */*
HTTP_ACCEPT_ENCODING gzip
HTTP_CONNECTION Keep-Alive
CONTENT_LENGTH 0
HTTP_HOST www.cookianime.com
HTTP_USER_AGENT claudebot
HTTP_X_FORWARDED_HOST www.cookianime.com
HTTP_X_FORWARDED_PROTO https
REDIRECT_REDIRECT_REDIRECT_UNIQUE_ID ZfkBHOpTM5HpGG0e4WsJzQAAABc
REDIRECT_REDIRECT_REDIRECT_QS_SrvConn 102
REDIRECT_REDIRECT_REDIRECT_QS_AllConn 102
REDIRECT_REDIRECT_REDIRECT_QS_ConnectionId 1710817564849301231078528
REDIRECT_REDIRECT_REDIRECT_SCRIPT_URL /search
REDIRECT_REDIRECT_REDIRECT_SCRIPT_URI https://www.cookianime.com/search
REDIRECT_REDIRECT_REDIRECT_LSWS_EDITION Openlitespeed
REDIRECT_REDIRECT_REDIRECT_X-LSCACHE on
REDIRECT_REDIRECT_REDIRECT_REGISTER_GLOBALS 0
REDIRECT_REDIRECT_REDIRECT_TZ Europe/Paris
REDIRECT_REDIRECT_REDIRECT_HTTP_AUTHORIZATION
REDIRECT_REDIRECT_REDIRECT_HTTPS on
REDIRECT_REDIRECT_REDIRECT_SSL_TLS_SNI www.cookianime.com
REDIRECT_REDIRECT_REDIRECT_STATUS 200
REDIRECT_REDIRECT_UNIQUE_ID ZfkBHOpTM5HpGG0e4WsJzQAAABc
REDIRECT_REDIRECT_QS_SrvConn 102
REDIRECT_REDIRECT_QS_AllConn 102
REDIRECT_REDIRECT_QS_ConnectionId 1710817564849301231078528
REDIRECT_REDIRECT_SCRIPT_URL /search
REDIRECT_REDIRECT_SCRIPT_URI https://www.cookianime.com/search
REDIRECT_REDIRECT_LSWS_EDITION Openlitespeed
REDIRECT_REDIRECT_X-LSCACHE on
REDIRECT_REDIRECT_REGISTER_GLOBALS 0
REDIRECT_REDIRECT_TZ Europe/Paris
REDIRECT_REDIRECT_HTTPS on
REDIRECT_REDIRECT_SSL_TLS_SNI www.cookianime.com
REDIRECT_REDIRECT_STATUS 200
REDIRECT_UNIQUE_ID ZfkBHOpTM5HpGG0e4WsJzQAAABc
REDIRECT_QS_SrvConn 102
REDIRECT_QS_AllConn 102
REDIRECT_QS_ConnectionId 1710817564849301231078528
REDIRECT_SCRIPT_URL /search
REDIRECT_SCRIPT_URI https://www.cookianime.com/search
REDIRECT_LSWS_EDITION Openlitespeed
REDIRECT_X-LSCACHE on
REDIRECT_REGISTER_GLOBALS 0
REDIRECT_TZ Europe/Paris
REDIRECT_HTTP_AUTHORIZATION
REDIRECT_HTTPS on
REDIRECT_SSL_TLS_SNI www.cookianime.com
REDIRECT_STATUS 200
UNIQUE_ID ZfkBHOpTM5HpGG0e4WsJzQAAABc
QS_SrvConn 102
QS_AllConn 102
QS_ConnectionId 1710817564849301231078528
SCRIPT_URL /search
SCRIPT_URI https://www.cookianime.com/search
LSWS_EDITION Openlitespeed
X-LSCACHE on
REGISTER_GLOBALS 0
TZ Europe/Paris
HTTPS on
SSL_TLS_SNI www.cookianime.com
SERVER_SIGNATURE
SERVER_SOFTWARE Apache
SERVER_NAME www.cookianime.com
SERVER_ADDR 127.0.0.1
SERVER_PORT 443
REMOTE_ADDR 44.197.113.64
DOCUMENT_ROOT /home/cookqozi/public_html
REQUEST_SCHEME https
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT /home/cookqozi/public_html
SERVER_ADMIN cookqozi@cookianime.com
SCRIPT_FILENAME /home/cookqozi/public_html/webroot/index.php
REMOTE_PORT 56006
REDIRECT_URL /index.php/search
REDIRECT_QUERY_STRING q=sur-mesure
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING q=sur-mesure
REQUEST_URI /search?q=sur-mesure
SCRIPT_NAME /webroot/index.php
PATH_INFO /search
PATH_TRANSLATED redirect:/webroot/search
PHP_SELF /webroot/index.php
REQUEST_TIME_FLOAT 1710817564.9378
REQUEST_TIME 1710817564
empty
0. Whoops\Handler\PrettyPageHandler