Error
Call to a member function slug() on null Error thrown with message "Call to a member function slug() on null" Stacktrace: #51 Error in /var/www/apache_htdocs/moisesjafet.com/production/user/plugins/langswitcher/langswitcher.php:80 #50 Grav\Plugin\LangSwitcherPlugin:_getTranslatedUrl in /var/www/apache_htdocs/moisesjafet.com/production/user/plugins/langswitcher/langswitcher.php:143 #49 Grav\Plugin\LangSwitcherPlugin:onTwigSiteVariables in /var/www/apache_htdocs/moisesjafet.com/production/vendor/symfony/event-dispatcher/EventDispatcher.php:264 #48 Symfony\Component\EventDispatcher\EventDispatcher:doDispatch in /var/www/apache_htdocs/moisesjafet.com/production/vendor/symfony/event-dispatcher/EventDispatcher.php:239 #47 Symfony\Component\EventDispatcher\EventDispatcher:callListeners in /var/www/apache_htdocs/moisesjafet.com/production/vendor/symfony/event-dispatcher/EventDispatcher.php:73 #46 Symfony\Component\EventDispatcher\EventDispatcher:dispatch in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Grav.php:597 #45 Grav\Common\Grav:fireEvent in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Twig/Twig.php:413 #44 Grav\Common\Twig\Twig:processSite in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Service/OutputServiceProvider.php:36 #43 Grav\Common\Service\OutputServiceProvider:Grav\Common\Service\{closure} in /var/www/apache_htdocs/moisesjafet.com/production/vendor/pimple/pimple/src/Pimple/Container.php:122 #42 Pimple\Container:offsetGet in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Processors/RenderProcessor.php:40 #41 Grav\Common\Processors\RenderProcessor:process in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50 #40 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62 #39 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Processors/DebuggerAssetsProcessor.php:38 #38 Grav\Common\Processors\DebuggerAssetsProcessor:process in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50 #37 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62 #36 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Processors/PagesProcessor.php:112 #35 Grav\Common\Processors\PagesProcessor:process in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50 #34 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62 #33 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Processors/TwigProcessor.php:38 #32 Grav\Common\Processors\TwigProcessor:process in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50 #31 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62 #30 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Processors/AssetsProcessor.php:39 #29 Grav\Common\Processors\AssetsProcessor:process in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50 #28 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62 #27 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Processors/SchedulerProcessor.php:40 #26 Grav\Common\Processors\SchedulerProcessor:process in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50 #25 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62 #24 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Processors/BackupsProcessor.php:39 #23 Grav\Common\Processors\BackupsProcessor:process in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50 #22 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62 #21 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Processors/TasksProcessor.php:69 #20 Grav\Common\Processors\TasksProcessor:process in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50 #19 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62 #18 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Processors/RequestProcessor.php:64 #17 Grav\Common\Processors\RequestProcessor:process in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50 #16 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62 #15 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Processors/ThemesProcessor.php:38 #14 Grav\Common\Processors\ThemesProcessor:process in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50 #13 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62 #12 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Processors/PluginsProcessor.php:39 #11 Grav\Common\Processors\PluginsProcessor:process in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50 #10 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62 #9 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Processors/InitializeProcessor.php:130 #8 Grav\Common\Processors\InitializeProcessor:Grav\Common\Processors\{closure} in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Debugger.php:546 #7 Grav\Common\Debugger:profile in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Processors/InitializeProcessor.php:131 #6 Grav\Common\Processors\InitializeProcessor:process in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50 #5 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62 #4 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Middlewares/MultipartRequestSupport.php:40 #3 Grav\Framework\RequestHandler\Middlewares\MultipartRequestSupport:process in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50 #2 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62 #1 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Grav.php:312 #0 Grav\Common\Grav:process in /var/www/apache_htdocs/moisesjafet.com/production/index.php:47
Stack frames (52)
51
Error
/user/plugins/langswitcher/langswitcher.php80
50
Grav\Plugin\LangSwitcherPlugin _getTranslatedUrl
/user/plugins/langswitcher/langswitcher.php143
49
Grav\Plugin\LangSwitcherPlugin onTwigSiteVariables
/vendor/symfony/event-dispatcher/EventDispatcher.php264
48
Symfony\Component\EventDispatcher\EventDispatcher doDispatch
/vendor/symfony/event-dispatcher/EventDispatcher.php239
47
Symfony\Component\EventDispatcher\EventDispatcher callListeners
/vendor/symfony/event-dispatcher/EventDispatcher.php73
46
Symfony\Component\EventDispatcher\EventDispatcher dispatch
/system/src/Grav/Common/Grav.php597
45
Grav\Common\Grav fireEvent
/system/src/Grav/Common/Twig/Twig.php413
44
Grav\Common\Twig\Twig processSite
/system/src/Grav/Common/Service/OutputServiceProvider.php36
43
Grav\Common\Service\OutputServiceProvider Grav\Common\Service\{closure}
/vendor/pimple/pimple/src/Pimple/Container.php122
42
Pimple\Container offsetGet
/system/src/Grav/Common/Processors/RenderProcessor.php40
41
Grav\Common\Processors\RenderProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php50
40
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php62
39
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/DebuggerAssetsProcessor.php38
38
Grav\Common\Processors\DebuggerAssetsProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php50
37
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php62
36
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/PagesProcessor.php112
35
Grav\Common\Processors\PagesProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php50
34
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php62
33
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/TwigProcessor.php38
32
Grav\Common\Processors\TwigProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php50
31
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php62
30
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/AssetsProcessor.php39
29
Grav\Common\Processors\AssetsProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php50
28
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php62
27
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/SchedulerProcessor.php40
26
Grav\Common\Processors\SchedulerProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php50
25
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php62
24
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/BackupsProcessor.php39
23
Grav\Common\Processors\BackupsProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php50
22
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php62
21
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/TasksProcessor.php69
20
Grav\Common\Processors\TasksProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php50
19
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php62
18
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/RequestProcessor.php64
17
Grav\Common\Processors\RequestProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php50
16
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php62
15
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/ThemesProcessor.php38
14
Grav\Common\Processors\ThemesProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php50
13
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php62
12
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/PluginsProcessor.php39
11
Grav\Common\Processors\PluginsProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php50
10
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php62
9
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/InitializeProcessor.php130
8
Grav\Common\Processors\InitializeProcessor Grav\Common\Processors\{closure}
/system/src/Grav/Common/Debugger.php546
7
Grav\Common\Debugger profile
/system/src/Grav/Common/Processors/InitializeProcessor.php131
6
Grav\Common\Processors\InitializeProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php50
5
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php62
4
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Middlewares/MultipartRequestSupport.php40
3
Grav\Framework\RequestHandler\Middlewares\MultipartRequestSupport process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php50
2
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php62
1
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Grav.php312
0
Grav\Common\Grav process
/index.php47
/var/www/apache_htdocs/moisesjafet.com/production/user/plugins/langswitcher/langswitcher.php
 
    /**
     * Add current directory to twig lookup paths.
     */
    public function onTwigTemplatePaths()
    {
        $this->grav['twig']->twig_paths[] = __DIR__ . '/templates';
    }
 
    /**
     * Generate localized route based on the translated slugs found through the pages hierarchy
     */
    protected function _getTranslatedUrl($lang, $path)
    {
        $translated_url_parts = array();
        $pages = $this->grav['pages'];
        $page = $pages->get($path);
        $current_node = $page;
        $max_recursions = 10;
        while ($max_recursions > 0 && $current_node->slug() != 'pages' && $path != 'pages') {
            $translated_md_filepath = "{$path}/{$current_node->template()}.{$lang}.md";
            if (file_exists($translated_md_filepath)) {
                //$this->grav['language']->setActive($lang);
                $translated_page = new Page();
                $translated_page->init(new \SplFileInfo($translated_md_filepath));
                //$translated_page->filePath($translated_md_filepath);
                $translated_slug = $translated_page->slug();
                if (!empty($translated_slug)) {
                    array_unshift($translated_url_parts, $translated_slug);
                } else {
                    $untranslated_slug = $current_node->slug();
                    if (!empty($untranslated_slug)) {
                        array_unshift($translated_url_parts, $untranslated_slug);
                    }
                }
                $current_node = $current_node->parent();
                $path = dirname($path);
            }
            $max_recursions--;
        }
Arguments
  1. "Call to a member function slug() on null"
    
/var/www/apache_htdocs/moisesjafet.com/production/user/plugins/langswitcher/langswitcher.php
        $data->languages = $languages;
 
        if ($this->config->get('plugins.langswitcher.untranslated_pages_behavior') !== 'none') {
            $translated_pages = [];
            foreach ($languages as $language) {
                $translated_pages[$language] = null;
                $page_name_without_ext = substr($page->name(), 0, -(strlen($page->extension())));
                $translated_page_path = $page->path() . DS . $page_name_without_ext . '.' . $language . '.md';
                if (file_exists($translated_page_path)) {
                    $translated_page = new Page();
                    $translated_page->init(new \SplFileInfo($translated_page_path), $language . '.md');
                    $translated_pages[$language] = $translated_page;
                }
            }
            $data->translated_pages = $translated_pages;
        }
 
        $data->translated_routes = array();
        foreach ($data->languages as $language) {
            $data->translated_routes[$language] = $this->_getTranslatedUrl($language, $page->path());
            if (empty($data->translated_routes[$language])) {
                $data->translated_routes[$language] = $data->page_route;
            }
        }
 
        $data->current = $this->grav['language']->getLanguage();
 
        $this->grav['twig']->twig_vars['langswitcher'] = $this->grav['langswitcher'] = $data;
 
        if ($this->config->get('plugins.langswitcher.built_in_css')) {
            $this->grav['assets']->add('plugin://langswitcher/css/langswitcher.css');
        }
    }
 
    public function getNativeName($code) {
 
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/vendor/symfony/event-dispatcher/EventDispatcher.php
 
        foreach ($listeners as $listener) {
            if ($stoppable && $event->isPropagationStopped()) {
                break;
            }
            // @deprecated: the ternary operator is part of a BC layer and should be removed in 5.0
            $listener($listener instanceof WrappedListener ? new LegacyEventProxy($event) : $event, $eventName, $this);
        }
    }
 
    /**
     * @deprecated since Symfony 4.3, use callListeners() instead
     */
    protected function doDispatch($listeners, $eventName, Event $event)
    {
        foreach ($listeners as $listener) {
            if ($event->isPropagationStopped()) {
                break;
            }
            $listener($event, $eventName, $this);
        }
    }
 
    /**
     * Sorts the internal list of listeners for the given event by priority.
     */
    private function sortListeners(string $eventName)
    {
        krsort($this->listeners[$eventName]);
        $this->sorted[$eventName] = [];
 
        foreach ($this->listeners[$eventName] as &$listeners) {
            foreach ($listeners as $k => &$listener) {
                if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) {
                    $listener[0] = $listener[0]();
                    $listener[1] = $listener[1] ?? '__invoke';
                }
                $this->sorted[$eventName][] = $listener;
            }
        }
/var/www/apache_htdocs/moisesjafet.com/production/vendor/symfony/event-dispatcher/EventDispatcher.php
            } else {
                $this->removeListener($eventName, [$subscriber, \is_string($params) ? $params : $params[0]]);
            }
        }
    }
 
    /**
     * Triggers the listeners of an event.
     *
     * This method can be overridden to add functionality that is executed
     * for each listener.
     *
     * @param callable[] $listeners The event listeners
     * @param string     $eventName The name of the event to dispatch
     * @param object     $event     The event object to pass to the event handlers/listeners
     */
    protected function callListeners(iterable $listeners, string $eventName, $event)
    {
        if ($event instanceof Event) {
            $this->doDispatch($listeners, $eventName, $event);
 
            return;
        }
 
        $stoppable = $event instanceof ContractsEvent || $event instanceof StoppableEventInterface;
 
        foreach ($listeners as $listener) {
            if ($stoppable && $event->isPropagationStopped()) {
                break;
            }
            // @deprecated: the ternary operator is part of a BC layer and should be removed in 5.0
            $listener($listener instanceof WrappedListener ? new LegacyEventProxy($event) : $event, $eventName, $this);
        }
    }
 
    /**
     * @deprecated since Symfony 4.3, use callListeners() instead
     */
    protected function doDispatch($listeners, $eventName, Event $event)
    {
/var/www/apache_htdocs/moisesjafet.com/production/vendor/symfony/event-dispatcher/EventDispatcher.php
 
        if (\is_object($event)) {
            $eventName = $eventName ?? \get_class($event);
        } elseif (\is_string($event) && (null === $eventName || $eventName instanceof ContractsEvent || $eventName instanceof Event)) {
            @trigger_error(sprintf('Calling the "%s::dispatch()" method with the event name as the first argument is deprecated since Symfony 4.3, pass it as the second argument and provide the event object as the first argument instead.', EventDispatcherInterface::class), \E_USER_DEPRECATED);
            $swap = $event;
            $event = $eventName ?? new Event();
            $eventName = $swap;
        } else {
            throw new \TypeError(sprintf('Argument 1 passed to "%s::dispatch()" must be an object, "%s" given.', EventDispatcherInterface::class, \is_object($event) ? \get_class($event) : \gettype($event)));
        }
 
        if (null !== $this->optimized && null !== $eventName) {
            $listeners = $this->optimized[$eventName] ?? (empty($this->listeners[$eventName]) ? [] : $this->optimizeListeners($eventName));
        } else {
            $listeners = $this->getListeners($eventName);
        }
 
        if ($listeners) {
            $this->callListeners($listeners, $eventName, $event);
        }
 
        return $event;
    }
 
    /**
     * {@inheritdoc}
     */
    public function getListeners($eventName = null)
    {
        if (null !== $eventName) {
            if (empty($this->listeners[$eventName])) {
                return [];
            }
 
            if (!isset($this->sorted[$eventName])) {
                $this->sortListeners($eventName);
            }
 
            return $this->sorted[$eventName];
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Grav.php
        return $event;
    }
 
    /**
     * Fires an event with optional parameters.
     *
     * @param  string $eventName
     * @param  Event|null $event
     * @return Event
     */
    public function fireEvent($eventName, Event $event = null)
    {
        /** @var EventDispatcherInterface $events */
        $events = $this['events'];
        if (null === $event) {
            $event = new Event();
        }
 
        $timestamp = microtime(true);
        $events->dispatch($event, $eventName);
 
        /** @var Debugger $debugger */
        $debugger = $this['debugger'];
        $debugger->addEvent($eventName, $event, $events, $timestamp);
 
        return $event;
    }
 
    /**
     * Set the final content length for the page and flush the buffer
     *
     * @return void
     */
    public function shutdown(): void
    {
        // Prevent user abort allowing onShutdown event to run without interruptions.
        if (function_exists('ignore_user_abort')) {
            @ignore_user_abort(true);
        }
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Twig/Twig.php
 
        return $output;
    }
 
    /**
     * Twig process that renders the site layout. This is the main twig process that renders the overall
     * page and handles all the layout for the site display.
     *
     * @param string|null $format Output format (defaults to HTML).
     * @param array $vars
     * @return string the rendered output
     * @throws RuntimeException
     */
    public function processSite($format = null, array $vars = [])
    {
        try {
            $grav = $this->grav;
 
            // set the page now its been processed
            $grav->fireEvent('onTwigSiteVariables');
 
            /** @var Pages $pages */
            $pages = $grav['pages'];
 
            /** @var PageInterface $page */
            $page = $grav['page'];
 
            $twig_vars = $this->twig_vars;
            $twig_vars['theme'] = $grav['config']->get('theme');
            $twig_vars['pages'] = $pages->root();
            $twig_vars['page'] = $page;
            $twig_vars['header'] = $page->header();
            $twig_vars['media'] = $page->media();
            $twig_vars['content'] = $page->content();
 
            // determine if params are set, if so disable twig cache
            $params = $grav['uri']->params(null, true);
            if (!empty($params)) {
                $this->twig->setCache(false);
            }
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Service/OutputServiceProvider.php
/**
 * Class OutputServiceProvider
 * @package Grav\Common\Service
 */
class OutputServiceProvider implements ServiceProviderInterface
{
    /**
     * @param Container $container
     * @return void
     */
    public function register(Container $container)
    {
        $container['output'] = function ($c) {
            /** @var Twig $twig */
            $twig = $c['twig'];
 
            /** @var PageInterface $page */
            $page = $c['page'];
 
            return $twig->processSite($page->templateFormat());
        };
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/vendor/pimple/pimple/src/Pimple/Container.php
    {
        if (!isset($this->keys[$id])) {
            throw new UnknownIdentifierException($id);
        }
 
        if (
            isset($this->raw[$id])
            || !\is_object($this->values[$id])
            || isset($this->protected[$this->values[$id]])
            || !\method_exists($this->values[$id], '__invoke')
        ) {
            return $this->values[$id];
        }
 
        if (isset($this->factories[$this->values[$id]])) {
            return $this->values[$id]($this);
        }
 
        $raw = $this->values[$id];
        $val = $this->values[$id] = $raw($this);
        $this->raw[$id] = $raw;
 
        $this->frozen[$id] = true;
 
        return $val;
    }
 
    /**
     * Checks if a parameter or an object is set.
     *
     * @param string $id The unique identifier for the parameter or object
     *
     * @return bool
     */
    #[\ReturnTypeWillChange]
    public function offsetExists($id)
    {
        return isset($this->keys[$id]);
    }
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Processors/RenderProcessor.php
 * @package Grav\Common\Processors
 */
class RenderProcessor extends ProcessorBase
{
    /** @var string */
    public $id = 'render';
    /** @var string */
    public $title = 'Render';
 
    /**
     * @param ServerRequestInterface $request
     * @param RequestHandlerInterface $handler
     * @return ResponseInterface
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $this->startTimer();
 
        $container = $this->container;
        $output =  $container['output'];
 
        if ($output instanceof ResponseInterface) {
            return $output;
        }
 
        /** @var PageInterface $page */
        $page = $this->container['page'];
 
        // Use internal Grav output.
        $container->output = $output;
 
        ob_start();
 
        $event = new Event(['page' => $page, 'output' => &$container->output]);
        $container->fireEvent('onOutputGenerated', $event);
 
        echo $container->output;
 
        $html = ob_get_clean();
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    protected $handler;
 
    /** @var ContainerInterface|null */
    protected $container;
 
    /**
     * {@inheritdoc}
     * @throws InvalidArgumentException
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = array_shift($this->middleware);
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Processors/DebuggerAssetsProcessor.php
 */
class DebuggerAssetsProcessor extends ProcessorBase
{
    /** @var string */
    public $id = 'debugger_assets';
    /** @var string */
    public $title = 'Debugger Assets';
 
    /**
     * @param ServerRequestInterface $request
     * @param RequestHandlerInterface $handler
     * @return ResponseInterface
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $this->startTimer();
        $this->container['debugger']->addAssets();
        $this->stopTimer();
 
        return $handler->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    protected $handler;
 
    /** @var ContainerInterface|null */
    protected $container;
 
    /**
     * {@inheritdoc}
     * @throws InvalidArgumentException
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = array_shift($this->middleware);
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Processors/PagesProcessor.php
 
            /** @var Forms $forms */
            $forms = $this->container['forms'] ?? null;
            $form = $forms ? $forms->getActiveForm() : null;
 
            $options = ['page' => $page, 'form' => $form, 'request' => $request];
            if ($task) {
                $event = new Event(['task' => $task] + $options);
                $this->container->fireEvent('onPageTask', $event);
                $this->container->fireEvent('onPageTask.' . $task, $event);
            } elseif ($action) {
                $event = new Event(['action' => $action] + $options);
                $this->container->fireEvent('onPageAction', $event);
                $this->container->fireEvent('onPageAction.' . $action, $event);
            }
        }
 
        $this->stopTimer();
 
        return $handler->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    protected $handler;
 
    /** @var ContainerInterface|null */
    protected $container;
 
    /**
     * {@inheritdoc}
     * @throws InvalidArgumentException
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = array_shift($this->middleware);
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Processors/TwigProcessor.php
 */
class TwigProcessor extends ProcessorBase
{
    /** @var string */
    public $id = 'twig';
    /** @var string */
    public $title = 'Twig';
 
    /**
     * @param ServerRequestInterface $request
     * @param RequestHandlerInterface $handler
     * @return ResponseInterface
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $this->startTimer();
        $this->container['twig']->init();
        $this->stopTimer();
 
        return $handler->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    protected $handler;
 
    /** @var ContainerInterface|null */
    protected $container;
 
    /**
     * {@inheritdoc}
     * @throws InvalidArgumentException
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = array_shift($this->middleware);
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Processors/AssetsProcessor.php
class AssetsProcessor extends ProcessorBase
{
    /** @var string */
    public $id = '_assets';
    /** @var string */
    public $title = 'Assets';
 
    /**
     * @param ServerRequestInterface $request
     * @param RequestHandlerInterface $handler
     * @return ResponseInterface
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $this->startTimer();
        $this->container['assets']->init();
        $this->container->fireEvent('onAssetsInitialized');
        $this->stopTimer();
 
        return $handler->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    protected $handler;
 
    /** @var ContainerInterface|null */
    protected $container;
 
    /**
     * {@inheritdoc}
     * @throws InvalidArgumentException
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = array_shift($this->middleware);
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Processors/SchedulerProcessor.php
class SchedulerProcessor extends ProcessorBase
{
    /** @var string */
    public $id = '_scheduler';
    /** @var string */
    public $title = 'Scheduler';
 
    /**
     * @param ServerRequestInterface $request
     * @param RequestHandlerInterface $handler
     * @return ResponseInterface
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $this->startTimer();
        $scheduler = $this->container['scheduler'];
        $this->container->fireEvent('onSchedulerInitialized', new Event(['scheduler' => $scheduler]));
        $this->stopTimer();
 
        return $handler->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    protected $handler;
 
    /** @var ContainerInterface|null */
    protected $container;
 
    /**
     * {@inheritdoc}
     * @throws InvalidArgumentException
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = array_shift($this->middleware);
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Processors/BackupsProcessor.php
class BackupsProcessor extends ProcessorBase
{
    /** @var string */
    public $id = '_backups';
    /** @var string */
    public $title = 'Backups';
 
    /**
     * @param ServerRequestInterface $request
     * @param RequestHandlerInterface $handler
     * @return ResponseInterface
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $this->startTimer();
        $backups = $this->container['backups'];
        $backups->init();
        $this->stopTimer();
 
        return $handler->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    protected $handler;
 
    /** @var ContainerInterface|null */
    protected $container;
 
    /**
     * {@inheritdoc}
     * @throws InvalidArgumentException
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = array_shift($this->middleware);
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Processors/TasksProcessor.php
                        $response = $handler->handle($request);
                    }
 
                    $this->stopTimer();
 
                    return $response;
                } catch (NotFoundException $e) {
                    // Task not found: Let it pass through.
                }
            }
 
            if ($task) {
                $this->container->fireEvent('onTask.' . $task);
            } elseif ($action) {
                $this->container->fireEvent('onAction.' . $action);
            }
        }
        $this->stopTimer();
 
        return $handler->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    protected $handler;
 
    /** @var ContainerInterface|null */
    protected $container;
 
    /**
     * {@inheritdoc}
     * @throws InvalidArgumentException
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = array_shift($this->middleware);
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Processors/RequestProcessor.php
        $uri = $request->getUri();
        $ext = mb_strtolower(Utils::pathinfo($uri->getPath(), PATHINFO_EXTENSION));
 
        $request = $request
            ->withAttribute('grav', $this->container)
            ->withAttribute('time', $_SERVER['REQUEST_TIME_FLOAT'] ?? GRAV_REQUEST_TIME)
            ->withAttribute('route', Uri::getCurrentRoute()->withExtension($ext))
            ->withAttribute('referrer', $this->container['uri']->referrer());
 
        $event = new RequestHandlerEvent(['request' => $request, 'handler' => $handler]);
        /** @var RequestHandlerEvent $event */
        $event = $this->container->fireEvent('onRequestHandlerInit', $event);
        $response = $event->getResponse();
        $this->stopTimer();
 
        if ($response) {
            return $response;
        }
 
        return $handler->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    protected $handler;
 
    /** @var ContainerInterface|null */
    protected $container;
 
    /**
     * {@inheritdoc}
     * @throws InvalidArgumentException
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = array_shift($this->middleware);
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Processors/ThemesProcessor.php
 */
class ThemesProcessor extends ProcessorBase
{
    /** @var string */
    public $id = 'themes';
    /** @var string */
    public $title = 'Themes';
 
    /**
     * @param ServerRequestInterface $request
     * @param RequestHandlerInterface $handler
     * @return ResponseInterface
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $this->startTimer();
        $this->container['themes']->init();
        $this->stopTimer();
 
        return $handler->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    protected $handler;
 
    /** @var ContainerInterface|null */
    protected $container;
 
    /**
     * {@inheritdoc}
     * @throws InvalidArgumentException
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = array_shift($this->middleware);
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Processors/PluginsProcessor.php
class PluginsProcessor extends ProcessorBase
{
    /** @var string */
    public $id = 'plugins';
    /** @var string */
    public $title = 'Initialize Plugins';
 
    /**
     * @param ServerRequestInterface $request
     * @param RequestHandlerInterface $handler
     * @return ResponseInterface
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $this->startTimer();
        $grav = $this->container;
        $grav->fireEvent('onPluginsInitialized');
        $this->stopTimer();
 
        return $handler->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    protected $handler;
 
    /** @var ContainerInterface|null */
    protected $container;
 
    /**
     * {@inheritdoc}
     * @throws InvalidArgumentException
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = array_shift($this->middleware);
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Processors/InitializeProcessor.php
        // Initialize URI (uses session, see issue #3269).
        $this->initializeUri($config);
 
        // Grav may return redirect response right away.
        $redirectCode = (int)$config->get('system.pages.redirect_trailing_slash', 1);
        if ($redirectCode) {
            $response = $this->handleRedirectRequest($request, $redirectCode > 300 ? $redirectCode : null);
            if ($response) {
                $this->stopTimer('_init');
 
                return $response;
            }
        }
 
        $this->stopTimer('_init');
 
        // Wrap call to next handler so that debugger can profile it.
        /** @var Response $response */
        $response = $debugger->profile(static function () use ($handler, $request) {
            return $handler->handle($request);
        });
 
        // Log both request and response and return the response.
        return $debugger->logRequest($request, $response);
    }
 
    public function processCli(): void
    {
        // Load configuration.
        $config = $this->initializeConfig();
 
        // Initialize logger.
        $this->initializeLogger($config);
 
        // Disable debugger.
        $this->container['debugger']->enabled(false);
 
        // Set timezone, locale.
        $this->initializeLocale($config);
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Debugger.php
        }
 
        $this->addMeasures();
        $this->addDeprecations();
        $this->timers = [];
 
        return $this->debugbar->getData();
    }
 
    /**
     * Hierarchical Profiler support.
     *
     * @param callable $callable
     * @param string|null $message
     * @return mixed
     */
    public function profile(callable $callable, string $message = null)
    {
        $this->startProfiling();
        $response = $callable();
        $this->stopProfiling($message);
 
        return $response;
    }
 
    public function addTwigProfiler(Environment $twig): void
    {
        $clockwork = $this->getClockwork();
        if ($clockwork) {
            $source = new TwigClockworkDataSource($twig);
            $source->listenToEvents();
            $clockwork->addDataSource($source);
        }
    }
 
    /**
     * Start profiling code.
     *
     * @return void
     */
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Processors/InitializeProcessor.php
        $this->initializeUri($config);
 
        // Grav may return redirect response right away.
        $redirectCode = (int)$config->get('system.pages.redirect_trailing_slash', 1);
        if ($redirectCode) {
            $response = $this->handleRedirectRequest($request, $redirectCode > 300 ? $redirectCode : null);
            if ($response) {
                $this->stopTimer('_init');
 
                return $response;
            }
        }
 
        $this->stopTimer('_init');
 
        // Wrap call to next handler so that debugger can profile it.
        /** @var Response $response */
        $response = $debugger->profile(static function () use ($handler, $request) {
            return $handler->handle($request);
        });
 
        // Log both request and response and return the response.
        return $debugger->logRequest($request, $response);
    }
 
    public function processCli(): void
    {
        // Load configuration.
        $config = $this->initializeConfig();
 
        // Initialize logger.
        $this->initializeLogger($config);
 
        // Disable debugger.
        $this->container['debugger']->enabled(false);
 
        // Set timezone, locale.
        $this->initializeLocale($config);
 
        // Load plugins.
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    protected $handler;
 
    /** @var ContainerInterface|null */
    protected $container;
 
    /**
     * {@inheritdoc}
     * @throws InvalidArgumentException
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = array_shift($this->middleware);
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Middlewares/MultipartRequestSupport.php
use function in_array;
use function is_array;
use function strlen;
 
/**
 * Multipart request support for PUT and PATCH.
 */
class MultipartRequestSupport implements MiddlewareInterface
{
    /**
     * @param ServerRequestInterface $request
     * @param RequestHandlerInterface $handler
     * @return ResponseInterface
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $contentType = $request->getHeaderLine('content-type');
        $method = $request->getMethod();
        if (!str_starts_with($contentType, 'multipart/form-data') || !in_array($method, ['PUT', 'PATH'], true)) {
            return $handler->handle($request);
        }
 
        $boundary = explode('; boundary=', $contentType, 2)[1] ?? '';
        $parts = explode("--{$boundary}", $request->getBody()->getContents());
        $parts = array_slice($parts, 1, count($parts) - 2);
 
        $params = [];
        $files = [];
        foreach ($parts as $part) {
            $this->processPart($params, $files, $part);
        }
 
        return $handler->handle($request->withParsedBody($params)->withUploadedFiles($files));
    }
 
    /**
     * @param array $params
     * @param array $files
     * @param string $part
     * @return void
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    protected $handler;
 
    /** @var ContainerInterface|null */
    protected $container;
 
    /**
     * {@inheritdoc}
     * @throws InvalidArgumentException
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = array_shift($this->middleware);
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/apache_htdocs/moisesjafet.com/production/system/src/Grav/Common/Grav.php
                },
                'pagesProcessor' => function () {
                    return new PagesProcessor($this);
                },
                'debuggerAssetsProcessor' => function () {
                    return new DebuggerAssetsProcessor($this);
                },
                'renderProcessor' => function () {
                    return new RenderProcessor($this);
                },
            ]
        );
 
        $default = static function () {
            return new Response(404, ['Expires' => 0, 'Cache-Control' => 'no-store, max-age=0'], 'Not Found');
        };
 
        $collection = new RequestHandler($this->middleware, $default, $container);
 
        $response = $collection->handle($this['request']);
        $body = $response->getBody();
 
        /** @var Messages $messages */
        $messages = $this['messages'];
 
        // Prevent caching if session messages were displayed in the page.
        $noCache = $messages->isCleared();
        if ($noCache) {
            $response = $response->withHeader('Cache-Control', 'no-store, max-age=0');
        }
 
        // Handle ETag and If-None-Match headers.
        if ($response->getHeaderLine('ETag') === '1') {
            $etag = md5($body);
            $response = $response->withHeader('ETag', '"' . $etag . '"');
 
            $search = trim($this['request']->getHeaderLine('If-None-Match'), '"');
            if ($noCache === false && $search === $etag) {
                $response = $response->withStatus(304);
                $body = '';
/var/www/apache_htdocs/moisesjafet.com/production/index.php
 
// Register the auto-loader.
$loader = require $autoload;
 
// Set timezone to default, falls back to system if php.ini not set
date_default_timezone_set(@date_default_timezone_get());
 
// Set internal encoding.
@ini_set('default_charset', 'UTF-8');
mb_internal_encoding('UTF-8');
 
use Grav\Common\Grav;
use RocketTheme\Toolbox\Event\Event;
 
// Get the Grav instance
$grav = Grav::instance(array('loader' => $loader));
 
// Process the page
try {
    $grav->process();
} catch (\Error|\Exception $e) {
    $grav->fireEvent('onFatalException', new Event(array('exception' => $e)));
    throw $e;
}
 

Environment & details:

Key Value
btng
array:1 [
  "post" => array:1 [
    "tags" => "PHP7"
  ]
]
empty
empty
empty
Key Value
redirect_after_login
null
user
Grav\Common\User\User {#487}
Key Value
TEMP
"/tmp"
TMPDIR
"/tmp"
TMP
"/tmp"
PATH
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"
HOSTNAME
""
USER
"www-data"
HOME
"/var/www"
SCRIPT_NAME
"/index.php"
REQUEST_URI
"/doku.php/start?btng%5Bpost%5D%5Btags%5D=PHP7"
QUERY_STRING
"btng%5Bpost%5D%5Btags%5D=PHP7"
REQUEST_METHOD
"GET"
SERVER_PROTOCOL
"HTTP/1.0"
GATEWAY_INTERFACE
"CGI/1.1"
REDIRECT_QUERY_STRING
"btng%5Bpost%5D%5Btags%5D=PHP7"
REDIRECT_URL
"/doku.php/start"
REMOTE_PORT
"41840"
SCRIPT_FILENAME
"/var/www/apache_htdocs/moisesjafet.com/public/index.php"
SERVER_ADMIN
"[email protected]"
CONTEXT_DOCUMENT_ROOT
"/var/www/apache_htdocs/moisesjafet.com/public"
CONTEXT_PREFIX
""
REQUEST_SCHEME
"http"
DOCUMENT_ROOT
"/var/www/apache_htdocs/moisesjafet.com/public"
REMOTE_ADDR
"192.168.122.1"
SERVER_PORT
"80"
SERVER_ADDR
"192.168.122.89"
SERVER_NAME
"moisesjafet.com"
SERVER_SOFTWARE
"Apache"
SERVER_SIGNATURE
""
HTTP_CF_IPCOUNTRY
"US"
HTTP_CDN_LOOP
"cloudflare"
HTTP_CF_CONNECTING_IP
"44.204.94.166"
HTTP_USER_AGENT
"claudebot"
HTTP_ACCEPT
"*/*"
HTTP_CF_VISITOR
"{"scheme":"https"}"
HTTP_CF_RAY
"86b91d1e1969825a-IAD"
HTTP_ACCEPT_ENCODING
"gzip, br"
HTTP_CONNECTION
"close"
HTTP_X_FORWARDED_PROTO
"https"
HTTP_X_FORWARDED_FOR
"44.204.94.166, 172.70.175.113"
HTTP_X_REAL_IP
"172.70.175.113"
HTTP_HOST
"moisesjafet.com"
proxy-nokeepalive
"1"
REDIRECT_STATUS
"200"
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1711644569.378
REQUEST_TIME
1711644569
empty
0. Whoops\Handler\PrettyPageHandler
1. Whoops\Handler\CallbackHandler