Whoops \ Exception \ ErrorException (E_DEPRECATED)
mb_strrpos(): Passing the encoding as third parameter is deprecated. Use an explicit zero offset Whoops\Exception\ErrorException thrown with message "mb_strrpos(): Passing the encoding as third parameter is deprecated. Use an explicit zero offset" Stacktrace: #20 Whoops\Exception\ErrorException in /srv/data/web/vhosts/vincent-maillard.fr/htdocs/projets/eartsup/site/plugins/kirby-shortcode/thunderer-shortcode/vendor/thunderer/shortcode/src/Processor/Processor.php:139 #19 mb_strrpos in /srv/data/web/vhosts/vincent-maillard.fr/htdocs/projets/eartsup/site/plugins/kirby-shortcode/thunderer-shortcode/vendor/thunderer/shortcode/src/Processor/Processor.php:139 #18 Thunder\Shortcode\Processor\Processor:processHandler in /srv/data/web/vhosts/vincent-maillard.fr/htdocs/projets/eartsup/site/plugins/kirby-shortcode/thunderer-shortcode/vendor/thunderer/shortcode/src/Processor/Processor.php:104 #17 Thunder\Shortcode\Processor\Processor:processIteration in /srv/data/web/vhosts/vincent-maillard.fr/htdocs/projets/eartsup/site/plugins/kirby-shortcode/thunderer-shortcode/vendor/thunderer/shortcode/src/Processor/Processor.php:52 #16 Thunder\Shortcode\Processor\Processor:process in /srv/data/web/vhosts/vincent-maillard.fr/htdocs/projets/eartsup/site/plugins/kirby-shortcode/thunderer-shortcode/vendor/thunderer/shortcode/src/ShortcodeFacade.php:81 #15 Thunder\Shortcode\ShortcodeFacade:process in /srv/data/web/vhosts/vincent-maillard.fr/htdocs/projets/eartsup/site/plugins/kirby-shortcode/lib/shortcode.php:22 #14 shortcode:parse in /srv/data/web/vhosts/vincent-maillard.fr/htdocs/projets/eartsup/site/plugins/kirby-shortcode/lib/field-methods.php:4 #13 Kirby:{closure} in /srv/data/web/vhosts/vincent-maillard.fr/htdocs/projets/eartsup/kirby/vendor/getkirby/toolkit/helpers.php:282 #12 call in /srv/data/web/vhosts/vincent-maillard.fr/htdocs/projets/eartsup/kirby/core/field.php:110 #11 FieldAbstract:__call in /srv/data/web/vhosts/vincent-maillard.fr/htdocs/projets/eartsup/site/snippets/sub_article.php:2 #10 require in /srv/data/web/vhosts/vincent-maillard.fr/htdocs/projets/eartsup/kirby/vendor/getkirby/toolkit/lib/tpl.php:22 #9 Tpl:load in /srv/data/web/vhosts/vincent-maillard.fr/htdocs/projets/eartsup/kirby/kirby/component/snippet.php:38 #8 Kirby\Component\Snippet:render in /srv/data/web/vhosts/vincent-maillard.fr/htdocs/projets/eartsup/kirby/helpers.php:12 #7 snippet in /srv/data/web/vhosts/vincent-maillard.fr/htdocs/projets/eartsup/site/templates/default.php:22 #6 require in /srv/data/web/vhosts/vincent-maillard.fr/htdocs/projets/eartsup/kirby/vendor/getkirby/toolkit/lib/tpl.php:22 #5 Tpl:load in /srv/data/web/vhosts/vincent-maillard.fr/htdocs/projets/eartsup/kirby/kirby/component/template.php:103 #4 Kirby\Component\Template:render in /srv/data/web/vhosts/vincent-maillard.fr/htdocs/projets/eartsup/kirby/kirby.php:681 #3 Kirby:template in /srv/data/web/vhosts/vincent-maillard.fr/htdocs/projets/eartsup/kirby/kirby.php:669 #2 Kirby:render in /srv/data/web/vhosts/vincent-maillard.fr/htdocs/projets/eartsup/kirby/kirby/component/response.php:29 #1 Kirby\Component\Response:make in /srv/data/web/vhosts/vincent-maillard.fr/htdocs/projets/eartsup/kirby/kirby.php:751 #0 Kirby:launch in /srv/data/web/vhosts/vincent-maillard.fr/htdocs/projets/eartsup/index.php:16
Stack frames (21)
20
Whoops
\
Exception
\
ErrorException
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
site
/
plugins
/
kirby-shortcode
/
thunderer-shortcode
/
vendor
/
thunderer
/
shortcode
/
src
/
Processor
/
Processor.php
139
19
mb_strrpos
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
site
/
plugins
/
kirby-shortcode
/
thunderer-shortcode
/
vendor
/
thunderer
/
shortcode
/
src
/
Processor
/
Processor.php
139
18
Thunder
\
Shortcode
\
Processor
\
Processor
processHandler
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
site
/
plugins
/
kirby-shortcode
/
thunderer-shortcode
/
vendor
/
thunderer
/
shortcode
/
src
/
Processor
/
Processor.php
104
17
Thunder
\
Shortcode
\
Processor
\
Processor
processIteration
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
site
/
plugins
/
kirby-shortcode
/
thunderer-shortcode
/
vendor
/
thunderer
/
shortcode
/
src
/
Processor
/
Processor.php
52
16
Thunder
\
Shortcode
\
Processor
\
Processor
process
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
site
/
plugins
/
kirby-shortcode
/
thunderer-shortcode
/
vendor
/
thunderer
/
shortcode
/
src
/
ShortcodeFacade.php
81
15
Thunder
\
Shortcode
\
ShortcodeFacade
process
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
site
/
plugins
/
kirby-shortcode
/
lib
/
shortcode.php
22
14
shortcode
parse
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
site
/
plugins
/
kirby-shortcode
/
lib
/
field-methods.php
4
13
Kirby
{closure}
/
vendor
/
getkirby
/
toolkit
/
helpers.php
282
12
call
/
core
/
field.php
110
11
FieldAbstract
__call
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
site
/
snippets
/
sub_article.php
2
10
require
/
vendor
/
getkirby
/
toolkit
/
lib
/
tpl.php
22
9
Tpl
load
/
kirby
/
component
/
snippet.php
38
8
Kirby
\
Component
\
Snippet
render
/
helpers.php
12
7
snippet
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
site
/
templates
/
default.php
22
6
require
/
vendor
/
getkirby
/
toolkit
/
lib
/
tpl.php
22
5
Tpl
load
/
kirby
/
component
/
template.php
103
4
Kirby
\
Component
\
Template
render
/
kirby.php
681
3
Kirby
template
/
kirby.php
669
2
Kirby
render
/
kirby
/
component
/
response.php
29
1
Kirby
\
Component
\
Response
make
/
kirby.php
751
0
Kirby
launch
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
index.php
16
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
site
/
plugins
/
kirby-shortcode
/
thunderer-shortcode
/
vendor
/
thunderer
/
shortcode
/
src
/
Processor
/
Processor.php
            $length = mb_strlen($s->getText(), 'utf-8');
            $textLength = mb_strlen($state, 'utf-8');
 
            return mb_substr($state, 0, $offset, 'utf-8').$s->getReplacement().mb_substr($state, $offset + $length, $textLength, 'utf-8');
        }, $text);
    }
 
    private function processHandler(ParsedShortcodeInterface $parsed, ProcessorContext $context, $handler)
    {
        $processed = ProcessedShortcode::createFromContext(clone $context);
        $content = $this->processRecursion($processed, $context);
        $processed = $processed->withContent($content);
 
        if($handler) {
            return call_user_func_array($handler, array($processed));
        }
 
        $state = $parsed->getText();
        $length = mb_strlen($processed->getTextContent(), 'utf-8');
        $offset = mb_strrpos($state, $processed->getTextContent(), 'utf-8');
 
        return mb_substr($state, 0, $offset, 'utf-8').$processed->getContent().mb_substr($state, $offset + $length, mb_strlen($state, 'utf-8'), 'utf-8');
    }
 
    private function processRecursion(ParsedShortcodeInterface $shortcode, ProcessorContext $context)
    {
        if ($this->autoProcessContent && null !== $shortcode->getContent()) {
            $context->recursionLevel++;
            // this is safe from using max iterations value because it's manipulated in process() method
            $content = $this->processIteration($shortcode->getContent(), clone $context, $shortcode);
            $context->recursionLevel--;
 
            return $content;
        }
 
        return $shortcode->getContent();
    }
 
    /**
     * Container for event handlers used in this processor.
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
site
/
plugins
/
kirby-shortcode
/
thunderer-shortcode
/
vendor
/
thunderer
/
shortcode
/
src
/
Processor
/
Processor.php
            $length = mb_strlen($s->getText(), 'utf-8');
            $textLength = mb_strlen($state, 'utf-8');
 
            return mb_substr($state, 0, $offset, 'utf-8').$s->getReplacement().mb_substr($state, $offset + $length, $textLength, 'utf-8');
        }, $text);
    }
 
    private function processHandler(ParsedShortcodeInterface $parsed, ProcessorContext $context, $handler)
    {
        $processed = ProcessedShortcode::createFromContext(clone $context);
        $content = $this->processRecursion($processed, $context);
        $processed = $processed->withContent($content);
 
        if($handler) {
            return call_user_func_array($handler, array($processed));
        }
 
        $state = $parsed->getText();
        $length = mb_strlen($processed->getTextContent(), 'utf-8');
        $offset = mb_strrpos($state, $processed->getTextContent(), 'utf-8');
 
        return mb_substr($state, 0, $offset, 'utf-8').$processed->getContent().mb_substr($state, $offset + $length, mb_strlen($state, 'utf-8'), 'utf-8');
    }
 
    private function processRecursion(ParsedShortcodeInterface $shortcode, ProcessorContext $context)
    {
        if ($this->autoProcessContent && null !== $shortcode->getContent()) {
            $context->recursionLevel++;
            // this is safe from using max iterations value because it's manipulated in process() method
            $content = $this->processIteration($shortcode->getContent(), clone $context, $shortcode);
            $context->recursionLevel--;
 
            return $content;
        }
 
        return $shortcode->getContent();
    }
 
    /**
     * Container for event handlers used in this processor.
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
site
/
plugins
/
kirby-shortcode
/
thunderer-shortcode
/
vendor
/
thunderer
/
shortcode
/
src
/
Processor
/
Processor.php
        $filterEvent = new FilterShortcodesEvent($this->parser->parse($text), $parent);
        $this->dispatchEvent(Events::FILTER_SHORTCODES, $filterEvent);
        $shortcodes = $filterEvent->getShortcodes();
        $replaces = array();
        $baseOffset = $parent && $shortcodes
            ? mb_strpos($parent->getShortcodeText(), $shortcodes[0]->getText(), null, 'utf-8') - $shortcodes[0]->getOffset() + $parent->getOffset()
            : 0;
        foreach ($shortcodes as $shortcode) {
            $hasNamePosition = array_key_exists($shortcode->getName(), $context->namePosition);
 
            $context->baseOffset = $baseOffset + $shortcode->getOffset();
            $context->position++;
            $context->namePosition[$shortcode->getName()] = $hasNamePosition ? $context->namePosition[$shortcode->getName()] + 1 : 1;
            $context->shortcodeText = $shortcode->getText();
            $context->offset = $shortcode->getOffset();
            $context->shortcode = $shortcode;
            $context->textContent = $shortcode->getContent();
 
            $handler = $this->handlers->get($shortcode->getName());
            $replace = $this->processHandler($shortcode, $context, $handler);
 
            $replaces[] = new ReplacedShortcode($shortcode, $replace);
        }
        $replaces = array_filter($replaces);
 
        $applyEvent = new ReplaceShortcodesEvent($text, $replaces, $parent);
        $this->dispatchEvent(Events::REPLACE_SHORTCODES, $applyEvent);
 
        return $applyEvent->hasResult() ? $applyEvent->getResult() : $this->applyReplaces($text, $replaces);
    }
 
    private function applyReplaces($text, array $replaces)
    {
        return array_reduce(array_reverse($replaces), function($state, ReplacedShortcode $s) {
            $offset = $s->getOffset();
            $length = mb_strlen($s->getText(), 'utf-8');
            $textLength = mb_strlen($state, 'utf-8');
 
            return mb_substr($state, 0, $offset, 'utf-8').$s->getReplacement().mb_substr($state, $offset + $length, $textLength, 'utf-8');
        }, $text);
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
site
/
plugins
/
kirby-shortcode
/
thunderer-shortcode
/
vendor
/
thunderer
/
shortcode
/
src
/
Processor
/
Processor.php
        $this->handlers = $handlers;
    }
 
    /**
     * Entry point for shortcode processing. Implements iterative algorithm for
     * both limited and unlimited number of iterations.
     *
     * @param string $text Text to process
     *
     * @return string
     */
    public function process($text)
    {
        $iterations = $this->maxIterations === null ? 1 : $this->maxIterations;
        $context = new ProcessorContext();
        $context->processor = $this;
 
        while ($iterations--) {
            $context->iterationNumber++;
            $newText = $this->processIteration($text, $context, null);
            if ($newText === $text) {
                break;
            }
            $text = $newText;
            $iterations += $this->maxIterations === null ? 1 : 0;
        }
 
        return $text;
    }
 
    private function dispatchEvent($name, $event)
    {
        if(null === $this->eventContainer) {
            return $event;
        }
 
        $handlers = $this->eventContainer->getListeners($name);
        foreach($handlers as $handler) {
            call_user_func_array($handler, array($event));
        }
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
site
/
plugins
/
kirby-shortcode
/
thunderer-shortcode
/
vendor
/
thunderer
/
shortcode
/
src
/
ShortcodeFacade.php
    public static function create(HandlerContainerInterface $handlers, SyntaxInterface $syntax)
    {
        $self = new self();
 
        $self->handlers = $handlers;
        $self->syntax = $syntax;
        $self->rebuildProcessor();
 
        return $self;
    }
 
    private function rebuildProcessor()
    {
        $this->processor = new Processor($this->parser, $this->handlers);
        $this->processor = $this->processor->withEventContainer($this->events);
    }
 
    public function process($text)
    {
        return $this->processor->process($text);
    }
 
    public function parse($text)
    {
        return $this->parser->parse($text);
    }
 
    public function setParser(ParserInterface $parser)
    {
        $this->parser = $parser;
        $this->rebuildProcessor();
 
        return $this;
    }
 
    public function addHandler($name, $handler)
    {
        $this->handlers->add($name, $handler);
 
        return $this;
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
site
/
plugins
/
kirby-shortcode
/
lib
/
shortcode.php
use Thunder\Shortcode\Shortcode\ShortcodeInterface;
 
class shortcode {
    public static function parse($field) {
        $facade = new ShortcodeFacade();
        $data = c::get('plugin.shortcode.create');
        $text = (string)$field;
 
        if($data) {
            foreach($data as $item) {
                $key = $item['name'];
                $callback = $item['text'];
 
                if(is_callable($callback)) {
                    $facade->addHandler($key, function(ShortcodeInterface $shortcode) use ($callback, $field) {
                        return call_user_func_array($callback, [$shortcode, $field]);
                    });
                }
            }
            return kirbytext($facade->process($text));
        }
        return kirbytext($text);
    }
}
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
site
/
plugins
/
kirby-shortcode
/
lib
/
field-methods.php
<?php
if(c::get('plugin.shortcode.field.method', true)) {
    field::$methods['kirbytext'] = field::$methods['kt'] = function($field) {
        $field->value = shortcode::parse($field);
        return $field;
    };
}
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
kirby
/
vendor
/
getkirby
/
toolkit
/
helpers.php
 
/**
 * Facepalm typo alias
 * @see csrf()
 */
function csfr() {
  return call('csrf', func_get_args());
}
 
/**
 * Shortcut for call_user_func_array with a better handling of arguments
 *
 * @param mixed $function
 * @param mixed $arguments
 * @return mixed
 */
function call($function, $arguments = array()) {
  if(!is_callable($function)) return false;
  if(!is_array($arguments)) $arguments = array($arguments);
  return call_user_func_array($function, $arguments);
}
 
/**
 * Parses yaml structured text
 *
 * @param $string
 * @return array
 */
function yaml($string) {
  return yaml::decode($string);
}
 
/**
 * Simple email sender helper
 *
 * @param array $params
 * @return Email
 */
function email($params = array()) {
  return new Email($params);
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
kirby
/
core
/
field.php
  /**
   * Returns the field value
   * 
   * @return string
   */
  public function toString() {
    return $this->value;
  }
 
  /**
   * Applies registered Field methods 
   * 
   * @param string $method
   * @param array $arguments
   * @return mixed
   */
  public function __call($method, $arguments = array()) {
    if(isset(static::$methods[$method])) {
      array_unshift($arguments, clone $this);
      return call(static::$methods[$method], $arguments);
    } else {
      return $this;
    }
  }
 
  /**
   * Improved var_dump() output
   * 
   * @return array
   */
  public function __debuginfo() {
    return [
      'page'    => $this->page()->id(),
      'key'     => $this->key(),
      'value'   => $this->value()
    ];
  }
 
}
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
site
/
snippets
/
sub_article.php
 
      <?= $sub_page->text()->kirbytext() ?>
 
<div class="slider">
<?php foreach($sub_page->slideshow()->yaml() as $image): ?>   
  <?php if($image = $sub_page->image($image)): ?>
    <figure><?= $image->html(); ?></figure>
  <?php endif ?>
<?php endforeach; ?>
</div>
 
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
kirby
/
vendor
/
getkirby
/
toolkit
/
lib
/
tpl.php
/**
 * Tpl
 *
 * Super simple template engine
 *
 * @package   Kirby Toolkit
 * @author    Bastian Allgeier <bastian@getkirby.com>
 * @link      http://getkirby.com
 * @copyright Bastian Allgeier
 * @license   http://www.opensource.org/licenses/mit-license.php MIT License
 */
class Tpl extends Silo {
 
  public static $data = array();
 
  public static function load($_file, $_data = array(), $_return = true) {
    if(!file_exists($_file)) return false;
    ob_start();
    extract(array_merge(static::$data, (array)$_data));
    require($_file);
    $_content = ob_get_contents();
    ob_end_clean();
    if($_return) return $_content;
    echo $_content;
  }
 
}
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
kirby
/
kirby
/
component
/
snippet.php
   * Returns a snippet file path by name
   *
   * @param string $name
   * @return string
   */
  public function file($name) {
    return $this->kirby->roots()->snippets() . DS . str_replace('/', DS, $name) . '.php';
  }
 
  /**
   * Renders the snippet with the given data 
   * 
   * @param string $name
   * @param array $data
   * @param boolean $return
   * @return string
   */
  public function render($name, $data = [], $return = false) {
    if(is_object($data)) $data = ['item' => $data];
    return tpl::load($this->kirby->registry->get('snippet', $name), $data, $return);
  }
 
}
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
kirby
/
helpers.php
<?php
 
/**
 * Embeds a snippet from the snippet folder
 *
 * @param string $file
 * @param mixed $data array or object
 * @param boolean $return
 * @return string
 */
function snippet($file, $data = array(), $return = false) {
  return kirby::instance()->component('snippet')->render($file, $data, $return);
}
 
/**
 * Builds a css link tag for relative or absolute urls
 *
 * @param string $url
 * @param string|array $media Either a media string or an array of attributes
 * @return string
 */
function css() {
  return call([kirby::instance()->component('css'), 'tag'], func_get_args());
}
 
/**
 * Builds a script tag for relative or absolute links
 *
 * @param string $src
 * @param boolean|array $async Either true for the async attribute or an array of attributes
 * @return string
 */
function js() {
  return call([kirby::instance()->component('js'), 'tag'], func_get_args());
}
 
/**
 * Global markdown parser shortcut
 *
 * @param string $text
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
site
/
templates
/
default.php
  <aside>
    <?php snippet('menu') ?>
  </aside>
  
  <main>
    
    <h1><?= $page->title()->html() ?></h1>
 
 
<?php $children = $page->children()->visible() ?>
 
 
 
<?php foreach($children as $child): ?>
      <h2 id="<?=$child->slug()?>"><?= $child->title()->html() ?></h2>
      <section>
 
<?php $sub_pages = $child->children()->visible() ?>
<?php foreach($sub_pages as $sub_page): ?>
  <?php snippet($sub_page->intendedTemplate(), ['sub_page' => $sub_page]) ?>
<?php endforeach ?>
 
    </section>
 
<?php endforeach ?>
 
 
  </main>
 
<?php snippet('foot') ?>
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
kirby
/
vendor
/
getkirby
/
toolkit
/
lib
/
tpl.php
/**
 * Tpl
 *
 * Super simple template engine
 *
 * @package   Kirby Toolkit
 * @author    Bastian Allgeier <bastian@getkirby.com>
 * @link      http://getkirby.com
 * @copyright Bastian Allgeier
 * @license   http://www.opensource.org/licenses/mit-license.php MIT License
 */
class Tpl extends Silo {
 
  public static $data = array();
 
  public static function load($_file, $_data = array(), $_return = true) {
    if(!file_exists($_file)) return false;
    ob_start();
    extract(array_merge(static::$data, (array)$_data));
    require($_file);
    $_content = ob_get_contents();
    ob_end_clean();
    if($_return) return $_content;
    echo $_content;
  }
 
}
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
kirby
/
kirby
/
component
/
template.php
    if($template instanceof Page) {
      $page = $template;
      $file = $page->templateFile();
      $data = $this->data($page, $data);
    } else {
      $file = $template;
      $data = $this->data(null, $data);
    }
 
    // check for an existing template
    if(!file_exists($file)) {
      throw new Exception('The template could not be found');
    }
 
    // merge and register the template data globally
    $tplData = tpl::$data;
    tpl::$data = array_merge(tpl::$data, $data);
 
    // load the template
    $result = tpl::load($file, null, $return);
 
    // reset the template data
    tpl::$data = $tplData;
 
    return $result;
 
  }
 
}
 
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
kirby
/
kirby.php
      }
 
      return $template;
 
    }
 
    // return a fresh template
    return $this->template($page, $data);
 
  }
 
  /**
   * Template configuration
   *
   * @param Page $page
   * @param array $data
   * @return string
   */
  public function template(Page $page, $data = array()) {
    return $this->component('template')->render($page, $data);
  }
 
  public function request() {
    if(!is_null($this->request)) return $this->request;
    return $this->request = new Request($this);
  }
 
  public function router() {
    return $this->router;
  }
 
  public function route() {
    return $this->route;
  }
 
  /**
   * Starts the router, renders the page and returns the response
   *
   * @return mixed
   */
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
kirby
/
kirby.php
        }
 
      }
 
      // try to fetch the template from cache
      $template = $this->cache()->get($cacheId);
 
      // fetch fresh content if the cache is empty
      if(empty($template)) {
        $template = $this->template($page, $data);
        // store the result for the next round
        $this->cache()->set($cacheId, $template);
      }
 
      return $template;
 
    }
 
    // return a fresh template
    return $this->template($page, $data);
 
  }
 
  /**
   * Template configuration
   *
   * @param Page $page
   * @param array $data
   * @return string
   */
  public function template(Page $page, $data = array()) {
    return $this->component('template')->render($page, $data);
  }
 
  public function request() {
    if(!is_null($this->request)) return $this->request;
    return $this->request = new Request($this);
  }
 
  public function router() {
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
kirby
/
kirby
/
component
/
response.php
 * @link      http://getkirby.com
 * @copyright Bastian Allgeier
 * @license   http://getkirby.com/license
 */
class Response extends \Kirby\Component {
 
  /**
   * Builds and return the response by various input
   * 
   * @param mixed $response
   * @return mixed
   */
  public function make($response) {
 
    if(is_string($response)) {
      return $this->kirby->render(page($response));
    } else if(is_array($response)) {
      return $this->kirby->render(page($response[0]), $response[1]);
    } else if(is_a($response, 'Page')) {
      return $this->kirby->render($response);      
    } else if(is_a($response, 'Response')) {
      return $response;
    } else {
      return null;
    }
 
  }
 
}
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
kirby
/
kirby.php
    // check for a valid route
    if(is_null($this->route)) {
      header::status('500');
      header::type('json');
      die(json_encode(array(
        'status'  => 'error',
        'message' => 'Invalid route or request method'
      )));
    }
 
    // call the router action with all arguments from the pattern
    $response = call($this->route->action(), $this->route->arguments());
 
    // load all language variables
    // this can only be loaded once the router action has been called
    // otherwise the current language is not yet available
    $this->localize();
 
    // build the response
    $this->response = $this->component('response')->make($response);
 
    // store the current language in the session
    if(
        $this->option('language.detect') &&
        $this->site()->multilang() &&
        $this->site()->language()
      ) {
      s::set('kirby_language', $this->site()->language()->code());
    }
 
    return $this->response;
 
  }
 
  /**
   * Register a new hook
   *
   * @param string/array $hook The name of the hook
   * @param closure $callback
   */
/
srv
/
data
/
web
/
vhosts
/
vincent-maillard.fr
/
htdocs
/
projets
/
eartsup
/
index.php
<?php
 
define('DS', DIRECTORY_SEPARATOR);
 
// load kirby
require(__DIR__ . DS . 'kirby' . DS . 'bootstrap.php');
 
// check for a custom site.php
if(file_exists(__DIR__ . DS . 'site.php')) {
  require(__DIR__ . DS . 'site.php');
} else {
  $kirby = kirby();
}
 
// render
echo $kirby->launch();

Environment & details:

Key Value
Kirby Toolkit v2.5.12
Kirby CMS v2.5.12
empty
empty
empty
empty
empty
Key Value
LC_ALL C
LD_LIBRARY_PATH /opt/mysql-5.7/lib/x86_64-linux-gnu
_ /sbin/capsh
LANG C
OLDPWD /
DB_VERSION 5.7
CUSTOMER_DIR /srv/data
container_ttys /dev/pts/0 /dev/pts/1 /dev/pts/2 /dev/pts/3
MAX_MEM 256
DB_USER hosting-db
PREFIX /
container lxc
LOCAL_DIR /srv/run
WWW_ENGINE php
PWD /home/hosting-user
HOME /home/hosting-user
SYS_USER hosting-admin
TMPDIR /srv/data/tmp
DB_ENGINE mysql
PAAS lamp0
APP_USER hosting-app0
PAAS_USER hosting-user
SHLVL 2
WWW_VERSION 7.4
NO_MOUNT yes
LOGROTATE_CONF /srv/data/var/admin/logrotate.conf
PHP_USER hosting-user
PATH /usr/sbin:/usr/bin:/sbin/:/bin:/opt/php-7.4/bin:/opt/php-7.4/sbin:/opt/php-7.4/usr/bin:/opt/php-7.4/usr/sbin:/opt/mysql-5.7/bin:/opt/mysql-5.7/sbin:/opt/mysql-5.7/usr/bin:/opt/mysql-5.7/usr/sbin:/opt/sqlite-3/bin
GITWEB_USER hosting-user
LD_PRELOAD /usr/local/lib/gandi/gandi-preload.so
DISTRIB jessie
USER hosting-user
SCRIPT_NAME /projets/eartsup/index.php
REQUEST_URI /projets/eartsup/cours
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.1
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /projets/eartsup/cours
REMOTE_PORT 50728
SCRIPT_FILENAME /srv/data/web/vhosts/vincent-maillard.fr/htdocs/projets/eartsup/index.php
SERVER_ADMIN [no address given]
CONTEXT_DOCUMENT_ROOT /srv/data/web/vhosts/vincent-maillard.fr/htdocs
CONTEXT_PREFIX
REQUEST_SCHEME https
DOCUMENT_ROOT /srv/data/web/vhosts/vincent-maillard.fr/htdocs
REMOTE_ADDR 52.90.142.26
SERVER_PORT 443
SERVER_ADDR 172.21.45.16
SERVER_NAME vincent-maillard.fr
SERVER_SOFTWARE Apache
SERVER_SIGNATURE
HTTP_ACCEPT_ENCODING gzip
HTTP_X_FORWARDED_FOR 52.90.142.26
HTTP_GANDI_RP 385909
HTTP_HOST vincent-maillard.fr
HTTP_X_COUNTRY_CODE US
HTTP_X_FORWARDED_PROTO https
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
HTTP_SCHEME https
proxy-nokeepalive 1
HTTPS on
HTTP_MOD_REWRITE On
REDIRECT_STATUS 200
REDIRECT_HTTPS on
REDIRECT_HTTP_MOD_REWRITE On
FCGI_ROLE RESPONDER
PHP_SELF /projets/eartsup/index.php
REQUEST_TIME_FLOAT 1711689067.0558
REQUEST_TIME 1711689067
empty
0. Whoops\Handler\PrettyPageHandler