Whoops\Exception\ErrorException: fwrite(): write of 7186 bytes failed with errno=28 No space left on device in /var/www/grav/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:131 Stack trace: #0 /var/www/grav/system/src/Grav/Common/Debugger.php(352): Whoops\Run->handleError() #1 [internal function]: Grav\Common\Debugger->deprecatedErrorHandler() #2 /var/www/grav/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php(131): fwrite() #3 /var/www/grav/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php(117): Monolog\Handler\StreamHandler->streamWrite() #4 /var/www/grav/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(39): Monolog\Handler\StreamHandler->write() #5 /var/www/grav/vendor/monolog/monolog/src/Monolog/Logger.php(344): Monolog\Handler\AbstractProcessingHandler->handle() #6 /var/www/grav/vendor/monolog/monolog/src/Monolog/Logger.php(470): Monolog\Logger->addRecord() #7 /var/www/grav/system/src/Grav/Common/Errors/Errors.php(61): Monolog\Logger->addCritical() #8 /var/www/grav/vendor/filp/whoops/src/Whoops/Handler/CallbackHandler.php(50): Grav\Common\Errors\Errors->Grav\Common\Errors\{closure}() #9 /var/www/grav/vendor/filp/whoops/src/Whoops/Run.php(321): Whoops\Handler\CallbackHandler->handle() #10 [internal function]: Whoops\Run->handleException() #11 {main} Crikey! There was an error...
Whoops \ Exception \ ErrorException (E_NOTICE)
tempnam(): file created in the system's temporary directory Whoops\Exception\ErrorException thrown with message "tempnam(): file created in the system's temporary directory" Stacktrace: #51 Whoops\Exception\ErrorException in /var/www/grav/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php:250 #50 tempnam in /var/www/grav/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php:250 #49 Doctrine\Common\Cache\FileCache:writeFile in /var/www/grav/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php:100 #48 Doctrine\Common\Cache\FilesystemCache:doSave in /var/www/grav/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php:115 #47 Doctrine\Common\Cache\CacheProvider:save in /var/www/grav/system/src/Grav/Common/Cache.php:346 #46 Grav\Common\Cache:save in /var/www/grav/system/src/Grav/Common/Page/Pages.php:1023 #45 Grav\Common\Page\Pages:resetPages in /var/www/grav/system/src/Grav/Common/Page/Pages.php:997 #44 Grav\Common\Page\Pages:buildPages in /var/www/grav/system/src/Grav/Common/Page/Pages.php:261 #43 Grav\Common\Page\Pages:init in /var/www/grav/system/src/Grav/Common/Processors/PagesProcessor.php:30 #42 Grav\Common\Processors\PagesProcessor:process in /var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:45 #41 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:57 #40 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/grav/system/src/Grav/Common/Processors/TwigProcessor.php:27 #39 Grav\Common\Processors\TwigProcessor:process in /var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:45 #38 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:57 #37 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/grav/system/src/Grav/Common/Processors/AssetsProcessor.php:28 #36 Grav\Common\Processors\AssetsProcessor:process in /var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:45 #35 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:57 #34 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/grav/system/src/Grav/Common/Processors/SchedulerProcessor.php:29 #33 Grav\Common\Processors\SchedulerProcessor:process in /var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:45 #32 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:57 #31 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/grav/system/src/Grav/Common/Processors/BackupsProcessor.php:28 #30 Grav\Common\Processors\BackupsProcessor:process in /var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:45 #29 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:57 #28 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/grav/system/src/Grav/Common/Processors/TasksProcessor.php:59 #27 Grav\Common\Processors\TasksProcessor:process in /var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:45 #26 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:57 #25 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/grav/system/src/Grav/Common/Processors/RequestProcessor.php:52 #24 Grav\Common\Processors\RequestProcessor:process in /var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:45 #23 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:57 #22 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/grav/system/src/Grav/Common/Processors/ThemesProcessor.php:27 #21 Grav\Common\Processors\ThemesProcessor:process in /var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:45 #20 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:57 #19 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/grav/system/src/Grav/Common/Processors/PluginsProcessor.php:30 #18 Grav\Common\Processors\PluginsProcessor:process in /var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:45 #17 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:57 #16 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/grav/system/src/Grav/Common/Processors/InitializeProcessor.php:78 #15 Grav\Common\Processors\InitializeProcessor:process in /var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:45 #14 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:57 #13 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/grav/system/src/Grav/Common/Processors/DebuggerProcessor.php:27 #12 Grav\Common\Processors\DebuggerProcessor:process in /var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:45 #11 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:57 #10 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/grav/system/src/Grav/Common/Processors/ErrorsProcessor.php:27 #9 Grav\Common\Processors\ErrorsProcessor:process in /var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:45 #8 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:57 #7 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/grav/system/src/Grav/Common/Processors/LoggerProcessor.php:48 #6 Grav\Common\Processors\LoggerProcessor:process in /var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:45 #5 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:57 #4 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/grav/system/src/Grav/Common/Processors/ConfigurationProcessor.php:28 #3 Grav\Common\Processors\ConfigurationProcessor:process in /var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:45 #2 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:57 #1 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/grav/system/src/Grav/Common/Grav.php:249 #0 Grav\Common\Grav:process in /var/www/grav/index.php:54
Stack frames (52)
51
Whoops\Exception\ErrorException
/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php250
50
tempnam
/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php250
49
Doctrine\Common\Cache\FileCache writeFile
/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php100
48
Doctrine\Common\Cache\FilesystemCache doSave
/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php115
47
Doctrine\Common\Cache\CacheProvider save
/system/src/Grav/Common/Cache.php346
46
Grav\Common\Cache save
/system/src/Grav/Common/Page/Pages.php1023
45
Grav\Common\Page\Pages resetPages
/system/src/Grav/Common/Page/Pages.php997
44
Grav\Common\Page\Pages buildPages
/system/src/Grav/Common/Page/Pages.php261
43
Grav\Common\Page\Pages init
/system/src/Grav/Common/Processors/PagesProcessor.php30
42
Grav\Common\Processors\PagesProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php45
41
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php57
40
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/TwigProcessor.php27
39
Grav\Common\Processors\TwigProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php45
38
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php57
37
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/AssetsProcessor.php28
36
Grav\Common\Processors\AssetsProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php45
35
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php57
34
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/SchedulerProcessor.php29
33
Grav\Common\Processors\SchedulerProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php45
32
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php57
31
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/BackupsProcessor.php28
30
Grav\Common\Processors\BackupsProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php45
29
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php57
28
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/TasksProcessor.php59
27
Grav\Common\Processors\TasksProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php45
26
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php57
25
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/RequestProcessor.php52
24
Grav\Common\Processors\RequestProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php45
23
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php57
22
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/ThemesProcessor.php27
21
Grav\Common\Processors\ThemesProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php45
20
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php57
19
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/PluginsProcessor.php30
18
Grav\Common\Processors\PluginsProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php45
17
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php57
16
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/InitializeProcessor.php78
15
Grav\Common\Processors\InitializeProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php45
14
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php57
13
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/DebuggerProcessor.php27
12
Grav\Common\Processors\DebuggerProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php45
11
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php57
10
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/ErrorsProcessor.php27
9
Grav\Common\Processors\ErrorsProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php45
8
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php57
7
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/LoggerProcessor.php48
6
Grav\Common\Processors\LoggerProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php45
5
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php57
4
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/ConfigurationProcessor.php28
3
Grav\Common\Processors\ConfigurationProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php45
2
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php57
1
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Grav.php249
0
Grav\Common\Grav process
/index.php54
/var/www/grav/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php
     * Writes a string content to file in an atomic way.
     *
     * @param string $filename Path to the file where to write the data.
     * @param string $content  The content to write
     *
     * @return bool TRUE on success, FALSE if path cannot be created, if path is not writable or an any other error.
     */
    protected function writeFile(string $filename, string $content) : bool
    {
        $filepath = pathinfo($filename, PATHINFO_DIRNAME);
 
        if (! $this->createPathIfNeeded($filepath)) {
            return false;
        }
 
        if (! is_writable($filepath)) {
            return false;
        }
 
        $tmpFile = tempnam($filepath, 'swap');
        @chmod($tmpFile, 0666 & (~$this->umask));
 
        if (file_put_contents($tmpFile, $content) !== false) {
            @chmod($tmpFile, 0666 & (~$this->umask));
            if (@rename($tmpFile, $filename)) {
                return true;
            }
 
            @unlink($tmpFile);
        }
 
        return false;
    }
 
    private function getIterator() : Iterator
    {
        return new RecursiveIteratorIterator(
            new RecursiveDirectoryIterator($this->directory, FilesystemIterator::SKIP_DOTS),
            RecursiveIteratorIterator::CHILD_FIRST
        );
Arguments
  1. "tempnam(): file created in the system's temporary directory"
    
/var/www/grav/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php
     * Writes a string content to file in an atomic way.
     *
     * @param string $filename Path to the file where to write the data.
     * @param string $content  The content to write
     *
     * @return bool TRUE on success, FALSE if path cannot be created, if path is not writable or an any other error.
     */
    protected function writeFile(string $filename, string $content) : bool
    {
        $filepath = pathinfo($filename, PATHINFO_DIRNAME);
 
        if (! $this->createPathIfNeeded($filepath)) {
            return false;
        }
 
        if (! is_writable($filepath)) {
            return false;
        }
 
        $tmpFile = tempnam($filepath, 'swap');
        @chmod($tmpFile, 0666 & (~$this->umask));
 
        if (file_put_contents($tmpFile, $content) !== false) {
            @chmod($tmpFile, 0666 & (~$this->umask));
            if (@rename($tmpFile, $filename)) {
                return true;
            }
 
            @unlink($tmpFile);
        }
 
        return false;
    }
 
    private function getIterator() : Iterator
    {
        return new RecursiveIteratorIterator(
            new RecursiveDirectoryIterator($this->directory, FilesystemIterator::SKIP_DOTS),
            RecursiveIteratorIterator::CHILD_FIRST
        );
/var/www/grav/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php
        }
 
        fclose($resource);
 
        return $lifetime === 0 || $lifetime > time();
    }
 
    /**
     * {@inheritdoc}
     */
    protected function doSave($id, $data, $lifeTime = 0)
    {
        if ($lifeTime > 0) {
            $lifeTime = time() + $lifeTime;
        }
 
        $data     = serialize($data);
        $filename = $this->getFilename($id);
 
        return $this->writeFile($filename, $lifeTime . PHP_EOL . $data);
    }
}
 
/var/www/grav/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php
            $namespacedKeysAndValues[$this->getNamespacedId($key)] = $value;
        }
 
        return $this->doSaveMultiple($namespacedKeysAndValues, $lifetime);
    }
 
    /**
     * {@inheritdoc}
     */
    public function contains($id)
    {
        return $this->doContains($this->getNamespacedId($id));
    }
 
    /**
     * {@inheritdoc}
     */
    public function save($id, $data, $lifeTime = 0)
    {
        return $this->doSave($this->getNamespacedId($id), $data, $lifeTime);
    }
 
    /**
     * {@inheritdoc}
     */
    public function deleteMultiple(array $keys)
    {
        return $this->doDeleteMultiple(array_map([$this, 'getNamespacedId'], $keys));
    }
 
    /**
     * {@inheritdoc}
     */
    public function delete($id)
    {
        return $this->doDelete($this->getNamespacedId($id));
    }
 
    /**
     * {@inheritdoc}
/var/www/grav/system/src/Grav/Common/Cache.php
            return $this->driver->fetch($id);
        }
 
        return false;
    }
 
    /**
     * Stores a new cached entry.
     *
     * @param  string       $id       the id of the cached entry
     * @param  array|object $data     the data for the cached entry to store
     * @param  int          $lifetime the lifetime to store the entry in seconds
     */
    public function save($id, $data, $lifetime = null)
    {
        if ($this->enabled) {
            if ($lifetime === null) {
                $lifetime = $this->getLifetime();
            }
            $this->driver->save($id, $data, $lifetime);
        }
    }
 
    /**
     * Deletes an item in the cache based on the id
     *
     * @param string $id    the id of the cached data entry
     * @return bool         true if the item was deleted successfully
     */
    public function delete($id)
    {
        if ($this->enabled) {
            return $this->driver->delete($id);
        }
 
        return false;
    }
 
    /**
     * Deletes all cache
/var/www/grav/system/src/Grav/Common/Page/Pages.php
 
    /**
     * Accessible method to manually reset the pages cache
     *
     * @param string $pages_dir
     */
    public function resetPages($pages_dir)
    {
        $this->recurse($pages_dir);
        $this->buildRoutes();
 
        // cache if needed
        if ($this->grav['config']->get('system.cache.enabled')) {
            /** @var Cache $cache */
            $cache = $this->grav['cache'];
            /** @var Taxonomy $taxonomy */
            $taxonomy = $this->grav['taxonomy'];
 
            // save pages, routes, taxonomy, and sort to cache
            $cache->save($this->pages_cache_id, [$this->instances, $this->routes, $this->children, $taxonomy->taxonomy(), $this->sort]);
        }
    }
 
    /**
     * Recursive function to load & build page relationships.
     *
     * @param string    $directory
     * @param PageInterface|null $parent
     *
     * @return PageInterface
     * @throws \RuntimeException
     * @internal
     */
    protected function recurse($directory, PageInterface $parent = null)
    {
        $directory = rtrim($directory, DS);
        $page = new Page;
 
        /** @var Config $config */
        $config = $this->grav['config'];
/var/www/grav/system/src/Grav/Common/Page/Pages.php
                    break;
                default:
                    $hash = Folder::lastModifiedFile($pages_dir);
            }
 
            $this->pages_cache_id = md5($pages_dir . $hash . $language->getActive() . $config->checksum());
 
            $cached = $cache->fetch($this->pages_cache_id);
            if ($cached) {
                $this->grav['debugger']->addMessage('Page cache hit.');
 
                list($this->instances, $this->routes, $this->children, $taxonomy_map, $this->sort) = $cached;
 
                // If pages was found in cache, set the taxonomy
                $taxonomy->taxonomy($taxonomy_map);
            } else {
                $this->grav['debugger']->addMessage('Page cache missed, rebuilding pages..');
 
                // recurse pages and cache result
                $this->resetPages($pages_dir);
            }
        } else {
            $this->recurse($pages_dir);
            $this->buildRoutes();
        }
    }
 
    /**
     * Accessible method to manually reset the pages cache
     *
     * @param string $pages_dir
     */
    public function resetPages($pages_dir)
    {
        $this->recurse($pages_dir);
        $this->buildRoutes();
 
        // cache if needed
        if ($this->grav['config']->get('system.cache.enabled')) {
            /** @var Cache $cache */
/var/www/grav/system/src/Grav/Common/Page/Pages.php
    public function init()
    {
        if ($this->initialized) {
            return;
        }
 
        $config = $this->grav['config'];
        $this->ignore_files = $config->get('system.pages.ignore_files');
        $this->ignore_folders = $config->get('system.pages.ignore_folders');
        $this->ignore_hidden = $config->get('system.pages.ignore_hidden');
 
        $this->instances = [];
        $this->children = [];
        $this->routes = [];
 
        if (!$this->check_method) {
            $this->setCheckMethod($config->get('system.cache.check.method', 'file'));
        }
 
        $this->buildPages();
    }
 
    /**
     * Get or set last modification time.
     *
     * @param int $modified
     *
     * @return int|null
     */
    public function lastModified($modified = null)
    {
        if ($modified && $modified > $this->last_modified) {
            $this->last_modified = $modified;
        }
 
        return $this->last_modified;
    }
 
    /**
     * Returns a list of all pages.
/var/www/grav/system/src/Grav/Common/Processors/PagesProcessor.php
 
use Grav\Common\Page\Interfaces\PageInterface;
use RocketTheme\Toolbox\Event\Event;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
 
class PagesProcessor extends ProcessorBase
{
    public $id = 'pages';
    public $title = 'Pages';
 
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        $this->startTimer();
 
        // Dump Cache state
        $this->container['debugger']->addMessage($this->container['cache']->getCacheStatus());
 
        $this->container['pages']->init();
        $this->container->fireEvent('onPagesInitialized', new Event(['pages' => $this->container['pages']]));
        $this->container->fireEvent('onPageInitialized', new Event(['page' => $this->container['page']]));
 
        /** @var PageInterface $page */
        $page = $this->container['page'];
 
        if (!$page->routable()) {
            // If no page found, fire event
            $event = new Event(['page' => $page]);
            $event->page = null;
            $event = $this->container->fireEvent('onPageNotFound', $event);
 
            if (isset($event->page)) {
                unset ($this->container['page']);
                $this->container['page'] = $page = $event->page;
            } else {
                throw new \RuntimeException('Page Not Found', 404);
            }
 
            $this->addMessage("Routed to page {$page->rawRoute()} (type: {$page->template()}) [Not Found fallback]");
/var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    private $handler;
 
    /** @var ContainerInterface|null */
    private $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/grav/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/grav/system/src/Grav/Common/Processors/TwigProcessor.php
 */
 
namespace Grav\Common\Processors;
 
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
 
class TwigProcessor extends ProcessorBase
{
    public $id = 'twig';
    public $title = 'Twig';
 
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        $this->startTimer();
        $this->container['twig']->init();
        $this->stopTimer();
 
        return $handler->handle($request);
    }
}
 
/var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    private $handler;
 
    /** @var ContainerInterface|null */
    private $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/grav/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/grav/system/src/Grav/Common/Processors/AssetsProcessor.php
 
namespace Grav\Common\Processors;
 
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
 
class AssetsProcessor extends ProcessorBase
{
    public $id = '_assets';
    public $title = 'Assets';
 
    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/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    private $handler;
 
    /** @var ContainerInterface|null */
    private $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/grav/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/grav/system/src/Grav/Common/Processors/SchedulerProcessor.php
namespace Grav\Common\Processors;
 
use RocketTheme\Toolbox\Event\Event;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
 
class SchedulerProcessor extends ProcessorBase
{
    public $id = '_scheduler';
    public $title = 'Scheduler';
 
    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/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    private $handler;
 
    /** @var ContainerInterface|null */
    private $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/grav/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/grav/system/src/Grav/Common/Processors/BackupsProcessor.php
 
namespace Grav\Common\Processors;
 
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
 
class BackupsProcessor extends ProcessorBase
{
    public $id = '_backups';
    public $title = 'Backups';
 
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        $this->startTimer();
        $backups = $this->container['backups'];
        $backups->init();
        $this->stopTimer();
 
        return $handler->handle($request);
    }
}
 
/var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    private $handler;
 
    /** @var ContainerInterface|null */
    private $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/grav/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/grav/system/src/Grav/Common/Processors/TasksProcessor.php
                    }
 
                    $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/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    private $handler;
 
    /** @var ContainerInterface|null */
    private $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/grav/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/grav/system/src/Grav/Common/Processors/RequestProcessor.php
        $uri = $request->getUri();
        $ext = mb_strtolower(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/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    private $handler;
 
    /** @var ContainerInterface|null */
    private $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/grav/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/grav/system/src/Grav/Common/Processors/ThemesProcessor.php
 */
 
namespace Grav\Common\Processors;
 
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
 
class ThemesProcessor extends ProcessorBase
{
    public $id = 'themes';
    public $title = 'Themes';
 
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        $this->startTimer();
        $this->container['themes']->init();
        $this->stopTimer();
 
        return $handler->handle($request);
    }
}
 
/var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    private $handler;
 
    /** @var ContainerInterface|null */
    private $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/grav/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/grav/system/src/Grav/Common/Processors/PluginsProcessor.php
 
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
 
class PluginsProcessor extends ProcessorBase
{
    public $id = 'plugins';
    public $title = 'Plugins';
 
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        $this->startTimer();
        // TODO: remove in 2.0.
        $this->container['accounts'];
        $this->container['plugins']->init();
        $this->container->fireEvent('onPluginsInitialized');
        $this->stopTimer();
 
        return $handler->handle($request);
    }
}
 
/var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    private $handler;
 
    /** @var ContainerInterface|null */
    private $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/grav/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/grav/system/src/Grav/Common/Processors/InitializeProcessor.php
        }
 
        /** @var Uri $uri */
        $uri = $this->container['uri'];
        $uri->init();
 
        // Redirect pages with trailing slash if configured to do so.
        $path = $uri->path() ?: '/';
        if ($path !== '/'
            && $config->get('system.pages.redirect_trailing_slash', false)
            && Utils::endsWith($path, '/')) {
 
            $redirect = (string) $uri::getCurrentRoute()->toString();
            $this->container->redirect($redirect);
        }
 
        $this->container->setLocale();
        $this->stopTimer();
 
        return $handler->handle($request);
    }
}
 
/var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    private $handler;
 
    /** @var ContainerInterface|null */
    private $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/grav/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/grav/system/src/Grav/Common/Processors/DebuggerProcessor.php
 */
 
namespace Grav\Common\Processors;
 
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
 
class DebuggerProcessor extends ProcessorBase
{
    public $id = '_debugger';
    public $title = 'Init Debugger';
 
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        $this->startTimer();
        $this->container['debugger']->init();
        $this->stopTimer();
 
        return $handler->handle($request);
    }
}
 
/var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    private $handler;
 
    /** @var ContainerInterface|null */
    private $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/grav/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/grav/system/src/Grav/Common/Processors/ErrorsProcessor.php
 */
 
namespace Grav\Common\Processors;
 
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
 
class ErrorsProcessor extends ProcessorBase
{
    public $id = '_errors';
    public $title = 'Error Handlers Reset';
 
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        $this->startTimer();
        $this->container['errors']->resetHandlers();
        $this->stopTimer();
 
        return $handler->handle($request);
    }
}
 
/var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    private $handler;
 
    /** @var ContainerInterface|null */
    private $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/grav/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/grav/system/src/Grav/Common/Processors/LoggerProcessor.php
 
        /** @var Config $config */
        $config = $grav['config'];
 
        switch ($config->get('system.log.handler', 'file')) {
            case 'syslog':
                $log = $grav['log'];
                $log->popHandler();
 
                $facility = $config->get('system.log.syslog.facility', 'local6');
                $logHandler = new SyslogHandler('grav', $facility);
                $formatter = new LineFormatter("%channel%.%level_name%: %message% %extra%");
                $logHandler->setFormatter($formatter);
 
                $log->pushHandler($logHandler);
                break;
        }
        $this->stopTimer();
 
        return $handler->handle($request);
    }
}
 
/var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    private $handler;
 
    /** @var ContainerInterface|null */
    private $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/grav/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/grav/system/src/Grav/Common/Processors/ConfigurationProcessor.php
 
namespace Grav\Common\Processors;
 
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
 
class ConfigurationProcessor extends ProcessorBase
{
    public $id = '_config';
    public $title = 'Configuration';
 
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        $this->startTimer();
        $this->container['config']->init();
        $this->container['plugins']->setup();
        $this->stopTimer();
 
        return $handler->handle($request);
    }
}
 
/var/www/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    private $handler;
 
    /** @var ContainerInterface|null */
    private $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/grav/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/grav/system/src/Grav/Common/Grav.php
                },
                'debuggerAssetsProcessor' => function () {
                    return new DebuggerAssetsProcessor($this);
                },
                'renderProcessor' => function () {
                    return new RenderProcessor($this);
                },
            ]
        );
 
        $default = function (ServerRequestInterface $request) {
            return new Response(404);
        };
 
        /** @var Debugger $debugger */
        $debugger = $this['debugger'];
 
        $collection = new RequestHandler($this->middleware, $default, $container);
 
        $response = $collection->handle($this['request']);
        $body = $response->getBody();
 
        // Handle ETag and If-None-Match headers.
        if ($response->getHeaderLine('ETag') === '1') {
            $etag = md5($body);
            $response = $response->withHeader('ETag', $etag);
 
            if ($this['request']->getHeaderLine('If-None-Match') === $etag) {
                $response = $response->withStatus(304);
                $body = '';
            }
        }
 
        $this->header($response);
        echo $body;
 
        $debugger->render();
 
        register_shutdown_function([$this, 'shutdown']);
    }
/var/www/grav/index.php
if (!is_file($autoload)) {
    die('Please run: <i>bin/grav install</i>');
}
 
// Register the auto-loader.
$loader = require $autoload;
 
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 $e) {
    $grav->fireEvent('onFatalException', new Event(array('exception' => $e)));
    throw $e;
} catch (\Exception $e) {
    $grav->fireEvent('onFatalException', new Event(array('exception' => $e)));
    throw $e;
}
 

Environment & details:

empty
empty
empty
empty
empty
Key Value
USER
"xyz"
HOME
"/var/www"
HTTP_ACCEPT_ENCODING
"gzip"
HTTP_X_REAL_IP
"3.94.150.98"
HTTP_X_FORWARDED_SERVER
"2de8430da048"
HTTP_X_FORWARDED_PROTO
"https"
HTTP_X_FORWARDED_PORT
"443"
HTTP_X_FORWARDED_HOST
"mxiia.com"
HTTP_X_FORWARDED_FOR
"3.94.150.98"
HTTP_REFERER
"http://mxiia.com/manual/pt-br/programs/log_server_status.html"
HTTP_ACCEPT
"*/*"
HTTP_USER_AGENT
"claudebot"
HTTP_HOST
"mxiia.com"
SCRIPT_FILENAME
"/var/www/grav//index.php"
REDIRECT_STATUS
"200"
SERVER_NAME
"f8f5f6ab5427"
SERVER_PORT
"80"
SERVER_ADDR
"172.18.0.2"
REMOTE_PORT
"35124"
REMOTE_ADDR
"172.18.0.3"
SERVER_SOFTWARE
"nginx/1.14.2"
GATEWAY_INTERFACE
"CGI/1.1"
REQUEST_SCHEME
"http"
SERVER_PROTOCOL
"HTTP/1.1"
DOCUMENT_ROOT
"/var/www/grav"
DOCUMENT_URI
"/index.php"
REQUEST_URI
"/manual/pt-br/programs/log_server_status.html"
SCRIPT_NAME
"/index.php"
CONTENT_LENGTH
""
CONTENT_TYPE
""
REQUEST_METHOD
"GET"
QUERY_STRING
""
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1711637823.1586
REQUEST_TIME
1711637823
empty
0. Whoops\Handler\CallbackHandler
1. Whoops\Handler\PrettyPageHandler