Whoops \ Exception \ ErrorException (E_NOTICE)
Trying to access array offset on value of type null Whoops\Exception\ErrorException thrown with message "Trying to access array offset on value of type null" Stacktrace: #15 Whoops\Exception\ErrorException in /home/jeanclaude/public_html/system/src/Grav/Common/Page/Pages.php:1264 #14 Grav\Common\Debugger:deprecatedErrorHandler in /home/jeanclaude/public_html/system/src/Grav/Common/Page/Pages.php:1264 #13 Grav\Common\Page\Pages:buildSort in /home/jeanclaude/public_html/system/src/Grav/Common/Page/Pages.php:350 #12 Grav\Common\Page\Pages:sortCollection in /home/jeanclaude/public_html/system/src/Grav/Common/Page/Collection.php:226 #11 Grav\Common\Page\Collection:order in /home/jeanclaude/public_html/system/src/Grav/Common/Page/Page.php:2624 #10 Grav\Common\Page\Page:collection in /home/jeanclaude/public_html/system/src/Grav/Common/Page/Pages.php:1133 #9 Grav\Common\Page\Pages:recurse in /home/jeanclaude/public_html/system/src/Grav/Common/Page/Pages.php:1113 #8 Grav\Common\Page\Pages:recurse in /home/jeanclaude/public_html/system/src/Grav/Common/Page/Pages.php:957 #7 Grav\Common\Page\Pages:buildPages in /home/jeanclaude/public_html/system/src/Grav/Common/Page/Pages.php:235 #6 Grav\Common\Page\Pages:init in /home/jeanclaude/public_html/system/src/Grav/Common/Processors/PagesProcessor.php:24 #5 Grav\Common\Processors\PagesProcessor:process in /home/jeanclaude/public_html/system/src/Grav/Common/Grav.php:131 #4 Grav\Common\Grav:Grav\Common\{closure} in /home/jeanclaude/public_html/system/src/Grav/Common/Grav.php:370 #3 Grav\Common\Grav:Grav\Common\{closure} in /home/jeanclaude/public_html/system/src/Grav/Common/Grav.php:346 #2 call_user_func_array in /home/jeanclaude/public_html/system/src/Grav/Common/Grav.php:346 #1 Grav\Common\Grav:__call in /home/jeanclaude/public_html/system/src/Grav/Common/Grav.php:132 #0 Grav\Common\Grav:process in /home/jeanclaude/public_html/index.php:54
Stack frames (16)
15
Whoops
\
Exception
\
ErrorException
/
system
/
src
/
Grav
/
Common
/
Page
/
Pages.php
1264
14
Grav
\
Common
\
Debugger
deprecatedErrorHandler
/
system
/
src
/
Grav
/
Common
/
Page
/
Pages.php
1264
13
Grav
\
Common
\
Page
\
Pages
buildSort
/
system
/
src
/
Grav
/
Common
/
Page
/
Pages.php
350
12
Grav
\
Common
\
Page
\
Pages
sortCollection
/
system
/
src
/
Grav
/
Common
/
Page
/
Collection.php
226
11
Grav
\
Common
\
Page
\
Collection
order
/
system
/
src
/
Grav
/
Common
/
Page
/
Page.php
2624
10
Grav
\
Common
\
Page
\
Page
collection
/
system
/
src
/
Grav
/
Common
/
Page
/
Pages.php
1133
9
Grav
\
Common
\
Page
\
Pages
recurse
/
system
/
src
/
Grav
/
Common
/
Page
/
Pages.php
1113
8
Grav
\
Common
\
Page
\
Pages
recurse
/
system
/
src
/
Grav
/
Common
/
Page
/
Pages.php
957
7
Grav
\
Common
\
Page
\
Pages
buildPages
/
system
/
src
/
Grav
/
Common
/
Page
/
Pages.php
235
6
Grav
\
Common
\
Page
\
Pages
init
/
system
/
src
/
Grav
/
Common
/
Processors
/
PagesProcessor.php
24
5
Grav
\
Common
\
Processors
\
PagesProcessor
process
/
system
/
src
/
Grav
/
Common
/
Grav.php
131
4
Grav
\
Common
\
Grav
Grav
\
Common
\
{closure}
/
system
/
src
/
Grav
/
Common
/
Grav.php
370
3
Grav
\
Common
\
Grav
Grav
\
Common
\
{closure}
/
system
/
src
/
Grav
/
Common
/
Grav.php
346
2
call_user_func_array
/
system
/
src
/
Grav
/
Common
/
Grav.php
346
1
Grav
\
Common
\
Grav
__call
/
system
/
src
/
Grav
/
Common
/
Grav.php
132
0
Grav
\
Common
\
Grav
process
/
index.php
54
/
home
/
jeanclaude
/
public_html
/
system
/
src
/
Grav
/
Common
/
Page
/
Pages.php
                    $sort_flags = SORT_REGULAR;
                    break;
                case 'publish_date':
                    $list[$key] = $child->publishDate();
                    $sort_flags = SORT_REGULAR;
                    break;
                case 'unpublish_date':
                    $list[$key] = $child->unpublishDate();
                    $sort_flags = SORT_REGULAR;
                    break;
                case 'slug':
                    $list[$key] = $child->slug();
                    break;
                case 'basename':
                    $list[$key] = basename($key);
                    break;
                case 'folder':
                    $list[$key] = $child->folder();
                    break;
                case (is_string($header_query[0])):
                    $child_header = new Header((array)$child->header());
                    $header_value = $child_header->get($header_query[0]);
                    if (is_array($header_value)) {
                        $list[$key] = implode(',',$header_value);
                    } elseif ($header_value) {
                        $list[$key] = $header_value;
                    } else {
                        $list[$key] = $header_default ?: $key;
                    }
                    $sort_flags = $sort_flags ?: SORT_REGULAR;
                    break;
                case 'manual':
                case 'default':
                default:
                    $list[$key] = $key;
                    $sort_flags = $sort_flags ?: SORT_REGULAR;
            }
        }
 
        if (!$sort_flags) {
Arguments
  1. "Trying to access array offset on value of type null"
    
/
home
/
jeanclaude
/
public_html
/
system
/
src
/
Grav
/
Common
/
Page
/
Pages.php
                    $sort_flags = SORT_REGULAR;
                    break;
                case 'publish_date':
                    $list[$key] = $child->publishDate();
                    $sort_flags = SORT_REGULAR;
                    break;
                case 'unpublish_date':
                    $list[$key] = $child->unpublishDate();
                    $sort_flags = SORT_REGULAR;
                    break;
                case 'slug':
                    $list[$key] = $child->slug();
                    break;
                case 'basename':
                    $list[$key] = basename($key);
                    break;
                case 'folder':
                    $list[$key] = $child->folder();
                    break;
                case (is_string($header_query[0])):
                    $child_header = new Header((array)$child->header());
                    $header_value = $child_header->get($header_query[0]);
                    if (is_array($header_value)) {
                        $list[$key] = implode(',',$header_value);
                    } elseif ($header_value) {
                        $list[$key] = $header_value;
                    } else {
                        $list[$key] = $header_default ?: $key;
                    }
                    $sort_flags = $sort_flags ?: SORT_REGULAR;
                    break;
                case 'manual':
                case 'default':
                default:
                    $list[$key] = $key;
                    $sort_flags = $sort_flags ?: SORT_REGULAR;
            }
        }
 
        if (!$sort_flags) {
Arguments
  1. 8
    
  2. "Trying to access array offset on value of type null"
    
  3. "/home/jeanclaude/public_html/system/src/Grav/Common/Page/Pages.php"
    
  4. 1264
    
  5. array:11 [
      "path" => "eafb1bf7308938d5e504a7961428ad1d"
      "pages" => array:8 [
        "/home/jeanclaude/public_html/user/pages/01.home/01._introduction" => array:1 [
          "slug" => "_introduction"
        ]
        "/home/jeanclaude/public_html/user/pages/01.home/05._produits" => array:1 [
          "slug" => "_produits"
        ]
        "/home/jeanclaude/public_html/user/pages/01.home/03._activites" => array:1 [
          "slug" => "_activites"
        ]
        "/home/jeanclaude/public_html/user/pages/01.home/04._formations" => array:1 [
          "slug" => "_formations"
        ]
        "/home/jeanclaude/public_html/user/pages/01.home/06._testimonies" => array:1 [
          "slug" => "_testimonies"
        ]
        "/home/jeanclaude/public_html/user/pages/01.home/07._derniere-actus" => array:1 [
          "slug" => "_derniere-actus"
        ]
        "/home/jeanclaude/public_html/user/pages/01.home/08._contact" => array:1 [
          "slug" => "_contact"
        ]
        "/home/jeanclaude/public_html/user/pages/01.home/02._jean-claude-anaf" => array:1 [
          "slug" => "_jean-claude-anaf"
        ]
      ]
      "order_by" => "default"
      "manual" => array:4 [
        0 => "_showcase"
        1 => "_highlights"
        2 => "_callout"
        3 => "_features"
      ]
      "sort_flags" => null
      "list" => []
      "header_default" => null
      "header_query" => null
      "info" => array:1 [
        "slug" => "_introduction"
      ]
      "key" => "/home/jeanclaude/public_html/user/pages/01.home/01._introduction"
      "child" => Page {}
    ]
    
/
home
/
jeanclaude
/
public_html
/
system
/
src
/
Grav
/
Common
/
Page
/
Pages.php
 
    /**
     * @param Collection $collection
     * @param            $orderBy
     * @param string     $orderDir
     * @param null       $orderManual
     *
     * @return array
     * @internal
     */
    public function sortCollection(Collection $collection, $orderBy, $orderDir = 'asc', $orderManual = null, $sort_flags = null)
    {
        $items = $collection->toArray();
        if (!$items) {
            return [];
        }
 
        $lookup = md5(json_encode($items) . json_encode($orderManual) . $orderBy . $orderDir);
        if (!isset($this->sort[$lookup][$orderBy])) {
            $this->buildSort($lookup, $items, $orderBy, $orderManual, $sort_flags);
        }
 
        $sort = $this->sort[$lookup][$orderBy];
 
        if ($orderDir !== 'asc') {
            $sort = array_reverse($sort);
        }
 
        return $sort;
 
    }
 
    /**
     * Get a page instance.
     *
     * @param  string $path The filesystem full path of the page
     *
     * @return Page
     * @throws \Exception
     */
Arguments
  1. "eafb1bf7308938d5e504a7961428ad1d"
    
  2. array:8 [
      "/home/jeanclaude/public_html/user/pages/01.home/01._introduction" => array:1 [
        "slug" => "_introduction"
      ]
      "/home/jeanclaude/public_html/user/pages/01.home/05._produits" => array:1 [
        "slug" => "_produits"
      ]
      "/home/jeanclaude/public_html/user/pages/01.home/03._activites" => array:1 [
        "slug" => "_activites"
      ]
      "/home/jeanclaude/public_html/user/pages/01.home/04._formations" => array:1 [
        "slug" => "_formations"
      ]
      "/home/jeanclaude/public_html/user/pages/01.home/06._testimonies" => array:1 [
        "slug" => "_testimonies"
      ]
      "/home/jeanclaude/public_html/user/pages/01.home/07._derniere-actus" => array:1 [
        "slug" => "_derniere-actus"
      ]
      "/home/jeanclaude/public_html/user/pages/01.home/08._contact" => array:1 [
        "slug" => "_contact"
      ]
      "/home/jeanclaude/public_html/user/pages/01.home/02._jean-claude-anaf" => array:1 [
        "slug" => "_jean-claude-anaf"
      ]
    ]
    
  3. "default"
    
  4. array:4 [
      0 => "_showcase"
      1 => "_highlights"
      2 => "_callout"
      3 => "_features"
    ]
    
  5. null
    
/
home
/
jeanclaude
/
public_html
/
system
/
src
/
Grav
/
Common
/
Page
/
Collection.php
        }
 
        parent::remove($key);
 
        return $this;
    }
 
    /**
     * Reorder collection.
     *
     * @param string $by
     * @param string $dir
     * @param array  $manual
     * @param string $sort_flags
     *
     * @return $this
     */
    public function order($by, $dir = 'asc', $manual = null, $sort_flags = null)
    {
        $this->items = $this->pages->sortCollection($this, $by, $dir, $manual, $sort_flags);
 
        return $this;
    }
 
    /**
     * Check to see if this item is the first in the collection.
     *
     * @param  string $path
     *
     * @return boolean True if item is first.
     */
    public function isFirst($path)
    {
        if ($this->items && $path == array_keys($this->items)[0]) {
            return true;
        } else {
            return false;
        }
    }
 
Arguments
  1. Collection {}
    
  2. "default"
    
  3. "asc"
    
  4. array:4 [
      0 => "_showcase"
      1 => "_highlights"
      2 => "_callout"
      3 => "_features"
    ]
    
  5. null
    
/
home
/
jeanclaude
/
public_html
/
system
/
src
/
Grav
/
Common
/
Page
/
Page.php
            $start = isset($params['dateRange']['start']) ? $params['dateRange']['start'] : 0;
            $end = isset($params['dateRange']['end']) ? $params['dateRange']['end'] : false;
            $field = isset($params['dateRange']['field']) ? $params['dateRange']['field'] : false;
            $collection->dateRange($start, $end, $field);
        }
 
        if (isset($params['order'])) {
            $by = isset($params['order']['by']) ? $params['order']['by'] : 'default';
            $dir = isset($params['order']['dir']) ? $params['order']['dir'] : 'asc';
            $custom = isset($params['order']['custom']) ? $params['order']['custom'] : null;
            $sort_flags = isset($params['order']['sort_flags']) ? $params['order']['sort_flags'] : null;
 
            if (is_array($sort_flags)) {
                $sort_flags = array_map('constant', $sort_flags); //transform strings to constant value
                $sort_flags = array_reduce($sort_flags, function ($a, $b) {
                    return $a | $b;
                }, 0); //merge constant values using bit or
            }
 
            $collection->order($by, $dir, $custom, $sort_flags);
        }
 
        /** @var Grav $grav */
        $grav = Grav::instance()['grav'];
 
        // New Custom event to handle things like pagination.
        $grav->fireEvent('onCollectionProcessed', new Event(['collection' => $collection]));
 
        // Slice and dice the collection if pagination is required
        if ($pagination) {
            $params = $collection->params();
 
            $limit = isset($params['limit']) ? $params['limit'] : 0;
            $start = !empty($params['pagination']) ? ($uri->currentPage() - 1) * $limit : 0;
 
            if ($limit && $collection->count() > $limit) {
                $collection->slice($start, $limit);
            }
        }
 
Arguments
  1. "default"
    
  2. "asc"
    
  3. array:4 [
      0 => "_showcase"
      1 => "_highlights"
      2 => "_callout"
      3 => "_features"
    ]
    
  4. null
    
/
home
/
jeanclaude
/
public_html
/
system
/
src
/
Grav
/
Common
/
Page
/
Pages.php
 
            if (Utils::startsWith($filename, '_')) {
                $child->routable(false);
            }
 
            $this->children[$page->path()][$child->path()] = ['slug' => $child->slug()];
 
            if ($config->get('system.pages.events.page')) {
                $this->grav->fireEvent('onFolderProcessed', new Event(['page' => $page]));
            }
        }
 
        // Set routability to false if no page found
        if (!$content_exists) {
            $page->routable(false);
        }
 
        // Override the modified time if modular
        if ($page->template() === 'modular') {
            foreach ($page->collection() as $child) {
                $modified = $child->modified();
 
                if ($modified > $last_modified) {
                    $last_modified = $modified;
                }
            }
        }
 
        // Override the modified and ID so that it takes the latest change into account
        $page->modified($last_modified);
        $page->id($last_modified . md5($page->filePath()));
 
        // Sort based on Defaults or Page Overridden sort order
        $this->children[$page->path()] = $this->sort($page);
 
        return $page;
    }
 
    /**
     * @internal
/
home
/
jeanclaude
/
public_html
/
system
/
src
/
Grav
/
Common
/
Page
/
Pages.php
                $this->grav->fireEvent('onPageProcessed', new Event(['page' => $page]));
            }
        }
 
        // Now handle all the folders under the page.
        /** @var \FilesystemIterator $file */
        foreach ($folders as $file) {
            $filename = $file->getFilename();
 
            // if folder contains separator, continue
            if (Utils::contains($file->getFilename(), $config->get('system.param_sep', ':'))) {
                continue;
            }
 
            if (!$page->path()) {
                $page->path($file->getPath());
            }
 
            $path = $directory . DS . $filename;
            $child = $this->recurse($path, $page);
 
            if (Utils::startsWith($filename, '_')) {
                $child->routable(false);
            }
 
            $this->children[$page->path()][$child->path()] = ['slug' => $child->slug()];
 
            if ($config->get('system.pages.events.page')) {
                $this->grav->fireEvent('onFolderProcessed', new Event(['page' => $page]));
            }
        }
 
        // Set routability to false if no page found
        if (!$content_exists) {
            $page->routable(false);
        }
 
        // Override the modified time if modular
        if ($page->template() === 'modular') {
            foreach ($page->collection() as $child) {
Arguments
  1. "/home/jeanclaude/public_html/user/pages/01.home"
    
  2. Page {}
    
/
home
/
jeanclaude
/
public_html
/
system
/
src
/
Grav
/
Common
/
Page
/
Pages.php
                default:
                    $hash = Folder::lastModifiedFile($pages_dir);
            }
 
            $this->pages_cache_id = md5($pages_dir . $hash . $language->getActive() . $config->checksum());
 
            list($this->instances, $this->routes, $this->children, $taxonomy_map, $this->sort) = $cache->fetch($this->pages_cache_id);
            if (!$this->instances) {
                $this->grav['debugger']->addMessage('Page cache missed, rebuilding pages..');
 
                // recurse pages and cache result
                $this->resetPages($pages_dir, $this->pages_cache_id);
 
            } else {
                // If pages was found in cache, set the taxonomy
                $this->grav['debugger']->addMessage('Page cache hit.');
                $taxonomy->taxonomy($taxonomy_map);
            }
        } else {
            $this->recurse($pages_dir);
            $this->buildRoutes();
        }
    }
 
    /**
     * Accessible method to manually reset the pages cache
     *
     * @param $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'];
Arguments
  1. "/home/jeanclaude/public_html/user/pages"
    
/
home
/
jeanclaude
/
public_html
/
system
/
src
/
Grav
/
Common
/
Page
/
Pages.php
        }
 
        return $this->baseUrl($lang, $absolute) . Uri::filterPath($route);
    }
 
    /**
     * Class initialization. Must be called before using this class.
     */
    public function init()
    {
        $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 = [];
 
        $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.
/
home
/
jeanclaude
/
public_html
/
system
/
src
/
Grav
/
Common
/
Processors
/
PagesProcessor.php
 * @copyright  Copyright (C) 2015 - 2018 Trilby Media, LLC. All rights reserved.
 * @license    MIT License; see LICENSE file for details.
 */
 
namespace Grav\Common\Processors;
 
use Grav\Common\Page\Page;
use RocketTheme\Toolbox\Event\Event;
 
class PagesProcessor extends ProcessorBase implements ProcessorInterface
{
    public $id = 'pages';
    public $title = 'Pages';
 
    public function process()
    {
        // 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 Page $page */
        $page = $this->container['page'];
 
        if (!$page->routable()) {
            // If no page found, fire event
            $event = $this->container->fireEvent('onPageNotFound', new Event(['page' => $page]));
 
            if (isset($event->page)) {
                unset ($this->container['page']);
                $this->container['page'] = $event->page;
            } else {
                throw new \RuntimeException('Page Not Found', 404);
            }
        }
 
    }
}
/
home
/
jeanclaude
/
public_html
/
system
/
src
/
Grav
/
Common
/
Grav.php
        } elseif ($values) {
            $instance = self::$instance;
            foreach ($values as $key => $value) {
                $instance->offsetSet($key, $value);
            }
        }
 
        return self::$instance;
    }
 
    /**
     * Process a request
     */
    public function process()
    {
        // process all processors (e.g. config, initialize, assets, ..., render)
        foreach ($this->processors as $processor) {
            $processor = $this[$processor];
            $this->measureTime($processor->id, $processor->title, function () use ($processor) {
                $processor->process();
            });
        }
 
        /** @var Debugger $debugger */
        $debugger = $this['debugger'];
        $debugger->render();
 
        register_shutdown_function([$this, 'shutdown']);
    }
 
    /**
     * Set the system locale based on the language and configuration
     */
    public function setLocale()
    {
        // Initialize Locale if set and configured.
        if ($this['language']->enabled() && $this['config']->get('system.languages.override_locale')) {
            $language = $this['language']->getLanguage();
            setlocale(LC_ALL, strlen($language) < 3 ? ($language . '_' . strtoupper($language)) : $language);
        } elseif ($this['config']->get('system.default_locale')) {
/
home
/
jeanclaude
/
public_html
/
system
/
src
/
Grav
/
Common
/
Grav.php
     *
     * @param  array $values
     *
     * @return static
     */
    protected static function load(array $values)
    {
        $container = new static($values);
 
        $container['grav'] = $container;
 
        $container['debugger'] = new Debugger();
        $debugger = $container['debugger'];
 
        // closure that measures time by wrapping a function into startTimer and stopTimer
        // The debugger can be passed to the closure. Should be more performant
        // then to get it from the container all time.
        $container->measureTime = function ($timerId, $timerTitle, $callback) use ($debugger) {
            $debugger->startTimer($timerId, $timerTitle);
            $callback();
            $debugger->stopTimer($timerId);
        };
 
        $container->measureTime('_services', 'Services', function () use ($container) {
            $container->registerServices($container);
        });
 
        return $container;
    }
 
    /**
     * Register all services
     * Services are defined in the diMap. They can either only the class
     * of a Service Provider or a pair of serviceKey => serviceClass that
     * gets directly mapped into the container.
     *
     * @return void
     */
    protected function registerServices()
    {
/
home
/
jeanclaude
/
public_html
/
system
/
src
/
Grav
/
Common
/
Grav.php
 
                ob_end_flush();
                @ob_flush();
                flush();
            }
        }
 
        // Run any time consuming tasks.
        $this->fireEvent('onShutdown');
    }
 
    /**
     * Magic Catch All Function
     * Used to call closures like measureTime on the instance.
     * Source: http://stackoverflow.com/questions/419804/closures-as-class-members
     */
    public function __call($method, $args)
    {
        $closure = $this->$method;
        call_user_func_array($closure, $args);
    }
 
    /**
     * Initialize and return a Grav instance
     *
     * @param  array $values
     *
     * @return static
     */
    protected static function load(array $values)
    {
        $container = new static($values);
 
        $container['grav'] = $container;
 
        $container['debugger'] = new Debugger();
        $debugger = $container['debugger'];
 
        // closure that measures time by wrapping a function into startTimer and stopTimer
        // The debugger can be passed to the closure. Should be more performant
Arguments
  1. "pages"
    
  2. "Pages"
    
  3. Closure {
      class: "Grav\Common\Grav"
      this: Grav { …}
      use: {
        $processor: PagesProcessor { …}
      }
    }
    
/
home
/
jeanclaude
/
public_html
/
system
/
src
/
Grav
/
Common
/
Grav.php
 
                ob_end_flush();
                @ob_flush();
                flush();
            }
        }
 
        // Run any time consuming tasks.
        $this->fireEvent('onShutdown');
    }
 
    /**
     * Magic Catch All Function
     * Used to call closures like measureTime on the instance.
     * Source: http://stackoverflow.com/questions/419804/closures-as-class-members
     */
    public function __call($method, $args)
    {
        $closure = $this->$method;
        call_user_func_array($closure, $args);
    }
 
    /**
     * Initialize and return a Grav instance
     *
     * @param  array $values
     *
     * @return static
     */
    protected static function load(array $values)
    {
        $container = new static($values);
 
        $container['grav'] = $container;
 
        $container['debugger'] = new Debugger();
        $debugger = $container['debugger'];
 
        // closure that measures time by wrapping a function into startTimer and stopTimer
        // The debugger can be passed to the closure. Should be more performant
Arguments
  1. Closure {
      class: "Grav\Common\Grav"
      parameters: {
        $timerId: {}
        $timerTitle: {}
        $callback: {}
      }
      use: {
        $debugger: Debugger { …}
      }
    }
    
  2. array:3 [
      0 => "pages"
      1 => "Pages"
      2 => Closure {
        class: "Grav\Common\Grav"
        this: Grav { …}
        use: {
          $processor: PagesProcessor { …}
        }
      }
    ]
    
/
home
/
jeanclaude
/
public_html
/
system
/
src
/
Grav
/
Common
/
Grav.php
            $instance = self::$instance;
            foreach ($values as $key => $value) {
                $instance->offsetSet($key, $value);
            }
        }
 
        return self::$instance;
    }
 
    /**
     * Process a request
     */
    public function process()
    {
        // process all processors (e.g. config, initialize, assets, ..., render)
        foreach ($this->processors as $processor) {
            $processor = $this[$processor];
            $this->measureTime($processor->id, $processor->title, function () use ($processor) {
                $processor->process();
            });
        }
 
        /** @var Debugger $debugger */
        $debugger = $this['debugger'];
        $debugger->render();
 
        register_shutdown_function([$this, 'shutdown']);
    }
 
    /**
     * Set the system locale based on the language and configuration
     */
    public function setLocale()
    {
        // Initialize Locale if set and configured.
        if ($this['language']->enabled() && $this['config']->get('system.languages.override_locale')) {
            $language = $this['language']->getLanguage();
            setlocale(LC_ALL, strlen($language) < 3 ? ($language . '_' . strtoupper($language)) : $language);
        } elseif ($this['config']->get('system.default_locale')) {
            setlocale(LC_ALL, $this['config']->get('system.default_locale'));
Arguments
  1. "measureTime"
    
  2. array:3 [
      0 => "pages"
      1 => "Pages"
      2 => Closure {
        class: "Grav\Common\Grav"
        this: Grav { …}
        use: {
          $processor: PagesProcessor { …}
        }
      }
    ]
    
/
home
/
jeanclaude
/
public_html
/
index.php
 
// Set timezone to default, falls back to system if php.ini not set
date_default_timezone_set(@date_default_timezone_get());
 
// Set internal encoding if mbstring loaded
if (!extension_loaded('mbstring')) {
    die("'mbstring' extension is not loaded.  This is required for Grav to run correctly");
}
mb_internal_encoding('UTF-8');
 
// Get the Grav instance
$grav = Grav::instance(
    array(
        'loader' => $loader
    )
);
 
// Process the page
try {
    $grav->process();
} catch (\Exception $e) {
    $grav->fireEvent('onFatalException', new Event(array('exception' => $e)));
    throw $e;
}
 

Environment & details:

empty
empty
empty
empty
empty
Key Value
PATH
"/usr/local/bin:/usr/bin:/bin"
TEMP
"/tmp"
TMP
"/tmp"
TMPDIR
"/tmp"
PWD
"/"
LSCAPI_CRIU_SYNC_FD
"7"
HTTP_ACCEPT
"*/*"
CONTENT_LENGTH
"0"
HTTP_HOST
"www.jean-claude-anaf.com"
HTTP_USER_AGENT
"claudebot"
HTTP_X_REAL_IP
"54.166.234.171"
HTTP_X_FORWARDED_PROTO
"http"
HTTP_X_FORWARDED_PORT
"80"
HTTP_X_COUNTRY_CODE
"US"
HTTP_X_AUTONOMOUS_SYSTEM
"14618"
HTTP_X_LSCACHE
"on,esi,crawler,combine"
REDIRECT_UNIQUE_ID
"ZflfSjRjX7xwZkUtosyOugAAAdU"
REDIRECT_SCRIPT_URL
"/formations/rasage-barbe"
REDIRECT_SCRIPT_URI
"http://www.jean-claude-anaf.com/formations/rasage-barbe"
REDIRECT_STATUS
"200"
UNIQUE_ID
"ZflfSjRjX7xwZkUtosyOugAAAdU"
SCRIPT_URL
"/formations/rasage-barbe"
SCRIPT_URI
"http://www.jean-claude-anaf.com/formations/rasage-barbe"
SERVER_SIGNATURE
""
SERVER_SOFTWARE
"Apache"
SERVER_NAME
"www.jean-claude-anaf.com"
SERVER_ADDR
"109.234.164.188"
SERVER_PORT
"80"
REMOTE_ADDR
"54.166.234.171"
DOCUMENT_ROOT
"/home/jeanclaude/public_html"
REQUEST_SCHEME
"http"
CONTEXT_PREFIX
""
CONTEXT_DOCUMENT_ROOT
"/home/jeanclaude/public_html"
SERVER_ADMIN
"webmaster@jean-claude-anaf.com"
SCRIPT_FILENAME
"/home/jeanclaude/public_html/index.php"
REMOTE_PORT
"56724"
REDIRECT_URL
"/formations/rasage-barbe"
SERVER_PROTOCOL
"HTTP/1.1"
REQUEST_METHOD
"GET"
QUERY_STRING
""
REQUEST_URI
"/formations/rasage-barbe"
SCRIPT_NAME
"/index.php"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1710841674.0641
REQUEST_TIME
1710841674
Key Value
PATH
"/usr/local/bin:/usr/bin:/bin"
TEMP
"/tmp"
TMP
"/tmp"
TMPDIR
"/tmp"
PWD
"/"
LSCAPI_CRIU_SYNC_FD
"7"
0. Whoops\Handler\PrettyPageHandler
1. Whoops\Handler\CallbackHandler