Whoops \ Exception \ ErrorException (E_NOTICE)
unserialize(): Error at offset 4090 of 4096 bytes Whoops\Exception\ErrorException thrown with message "unserialize(): Error at offset 4090 of 4096 bytes" Stacktrace: #13 Whoops\Exception\ErrorException in /home/ski2freedom/public_html/kirby/vendor/getkirby/toolkit/lib/cache/driver/file.php:84 #12 unserialize in /home/ski2freedom/public_html/kirby/vendor/getkirby/toolkit/lib/cache/driver/file.php:84 #11 Cache\Driver\File:retrieve in /home/ski2freedom/public_html/kirby/vendor/getkirby/toolkit/lib/cache/driver.php:70 #10 Cache\Driver:get in /home/ski2freedom/public_html/site/plugins/imageset/lib/cache.php:69 #9 Kirby\Plugins\ImageSet\Cache:get in /home/ski2freedom/public_html/site/plugins/imageset/lib/imageset.php:131 #8 Kirby\Plugins\ImageSet\ImageSet:__construct in /home/ski2freedom/public_html/site/plugins/imageset/helpers.php:11 #7 imageset in /home/ski2freedom/public_html/site/templates/blog.php:36 #6 require in /home/ski2freedom/public_html/kirby/vendor/getkirby/toolkit/lib/tpl.php:22 #5 Tpl:load in /home/ski2freedom/public_html/kirby/kirby/component/template.php:103 #4 Kirby\Component\Template:render in /home/ski2freedom/public_html/kirby/kirby.php:681 #3 Kirby:template in /home/ski2freedom/public_html/kirby/kirby.php:669 #2 Kirby:render in /home/ski2freedom/public_html/kirby/kirby/component/response.php:29 #1 Kirby\Component\Response:make in /home/ski2freedom/public_html/kirby/kirby.php:751 #0 Kirby:launch in /home/ski2freedom/public_html/index.php:16
Stack frames (14)
13
Whoops
\
Exception
\
ErrorException
/
vendor
/
getkirby
/
toolkit
/
lib
/
cache
/
driver
/
file.php
84
12
unserialize
/
vendor
/
getkirby
/
toolkit
/
lib
/
cache
/
driver
/
file.php
84
11
Cache
\
Driver
\
File
retrieve
/
vendor
/
getkirby
/
toolkit
/
lib
/
cache
/
driver.php
70
10
Cache
\
Driver
get
/
home
/
ski2freedom
/
public_html
/
site
/
plugins
/
imageset
/
lib
/
cache.php
69
9
Kirby
\
Plugins
\
ImageSet
\
Cache
get
/
home
/
ski2freedom
/
public_html
/
site
/
plugins
/
imageset
/
lib
/
imageset.php
131
8
Kirby
\
Plugins
\
ImageSet
\
ImageSet
__construct
/
home
/
ski2freedom
/
public_html
/
site
/
plugins
/
imageset
/
helpers.php
11
7
imageset
/
home
/
ski2freedom
/
public_html
/
site
/
templates
/
blog.php
36
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
/
home
/
ski2freedom
/
public_html
/
index.php
16
/
home
/
ski2freedom
/
public_html
/
kirby
/
vendor
/
getkirby
/
toolkit
/
lib
/
cache
/
driver
/
file.php
   * </code>
   *
   * @param  string  $key
   * @param  mixed   $value
   * @param  int     $minutes
   * @return void
   */
  public function set($key, $value, $minutes = null) {
    return f::write($this->file($key), serialize($this->value($value, $minutes)));
  }
 
  /**
   * Retrieve an item from the cache.
   *
   * @param  string  $key
   * @return object CacheValue
   */
  public function retrieve($key) {
    // unserialized value array (see $this->value())
    return unserialize(f::read($this->file($key)));
  }
 
  /**
   * Checks when the cache has been created
   *
   * @param string $key
   * @return int
   */
  public function created($key) {
    // use the modification timestamp
    // as indicator when the cache has been created/overwritten
    clearstatcache();
    // get the file for this cache key
    $file = $this->file($key);
    return file_exists($file) ? filemtime($this->file($key)) : 0;
  }
 
  /**
   * Remove an item from the cache
   *
/
home
/
ski2freedom
/
public_html
/
kirby
/
vendor
/
getkirby
/
toolkit
/
lib
/
cache
/
driver
/
file.php
   * </code>
   *
   * @param  string  $key
   * @param  mixed   $value
   * @param  int     $minutes
   * @return void
   */
  public function set($key, $value, $minutes = null) {
    return f::write($this->file($key), serialize($this->value($value, $minutes)));
  }
 
  /**
   * Retrieve an item from the cache.
   *
   * @param  string  $key
   * @return object CacheValue
   */
  public function retrieve($key) {
    // unserialized value array (see $this->value())
    return unserialize(f::read($this->file($key)));
  }
 
  /**
   * Checks when the cache has been created
   *
   * @param string $key
   * @return int
   */
  public function created($key) {
    // use the modification timestamp
    // as indicator when the cache has been created/overwritten
    clearstatcache();
    // get the file for this cache key
    $file = $this->file($key);
    return file_exists($file) ? filemtime($this->file($key)) : 0;
  }
 
  /**
   * Remove an item from the cache
   *
/
home
/
ski2freedom
/
public_html
/
kirby
/
vendor
/
getkirby
/
toolkit
/
lib
/
cache
/
driver.php
 
  /**
   * Get an item from the cache.
   *
   * <code>
   *   // Get an item from the cache driver
   *   $value = Cache::get('value');
   *
   *   // Return a default value if the requested item isn't cached
   *   $value = Cache::get('value', 'default value');
   * </code>
   *
   * @param  string  $key
   * @param  mixed   $default
   * @return mixed
   */
  public function get($key, $default = null) {
 
    // get the Value
    $value = $this->retrieve($key);
 
    // check for a valid cache value
    if(!is_a($value, 'Cache\\Value')) return $default;
 
    // remove the item if it is expired
    if(time() > $value->expires()) {
      $this->remove($key);
      return $default;
    }
 
    // get the pure value
    $cache = $value->value();
 
    // return the cache value or the default
    return (!is_null($cache)) ? $cache : $default;
 
  }
 
  /**
   * Calculates the expiration timestamp
/
home
/
ski2freedom
/
public_html
/
site
/
plugins
/
imageset
/
lib
/
cache.php
    } else {
      $path  = dirname($image->root());
      $file  = $image->filename();
      $index = $this->kirby->roots()->index();
      $pos   = strpos($path, $index);
      if($pos === 0) {
        $path = ltrim(substr($path, strlen($index)), DS);
      }
    }
 
    return $path . DS . $file . '-' . $key . '.' . static::CACHE_EXTENSION;
  }
 
  public function created(Media $image, $key) {
    return $this->driver->created($this->imageCachePath($image, $key));
  }
 
  public function get(Media $image, $key, $default = null) {
    if($this->created($image, $key) > $image->modified()) {
      return $this->driver->get($this->imageCachePath($image, $key), $default = null);
    } else {
      return $default;
    }
  }
 
  public function set(Media $image, $key, $value, $minutes = null) {
    $this->driver->set($this->imageCachePath($image, $key), $value, $minutes);
  }
  
  public function __call($name, $arguments) {
    return call_user_func_array([$this->driver, $name], $arguments);
  }
 
  public function flush() {
    $cacheFiles = $this->inventory();
 
    foreach($cacheFiles as $file) {
      f::remove($file);
    }
 
/
home
/
ski2freedom
/
public_html
/
site
/
plugins
/
imageset
/
lib
/
imageset.php
      $image = new Asset($image);
    }
 
    parent::__construct($image, array_merge(static::$defaults, is_array($options) ? $options : []));
    
    $this->kirby   = $kirby ?: kirby();
 
    if(is_null(static::$fileCache)) {
      static::$fileCache = Cache::instance();
      static::$plugin    = Plugin::instance();
    }
 
    if(is_string($sizes) && presets::exists($sizes)) {
      $this->sizes = presets::get($sizes);
    } else {
      $this->sizes = $sizes;
    };
 
    // Try to load ImageSet from cache
    $cacheValue = $this->option('cache', false) ? static::$fileCache->get($this->image, $this->hash()) : null;
 
    if(!is_null($cacheValue) && $cacheValue['imageset.version'] === static::$plugin->version() && $cacheValue['site.url'] === $this->kirby->urls()->index()) {
      $this->cache['html'] = $cacheValue['html'];
    } else {
      $this->sources = $this->setupSources($this->sizes);
    }
  }
 
  /**
   * Loads the settings defined in your `config.php` file
   * and overrides the plugin defaults.
   * 
   * @param $kirby The Kirby instance to read settings from.
   */
  public static function loadConfig($kirby = null) {
    $kirby = $kirby ?: kirby();
 
    foreach(static::$defaults as $key => $value) {
      $configValue = $kirby->option("imageset.$key");
      if(!is_null($configValue)) {
/
home
/
ski2freedom
/
public_html
/
site
/
plugins
/
imageset
/
helpers.php
<?php
 
use Kirby\Plugins\ImageSet\ImageSet as ImageSetClass;
use Kirby\Plugins\ImageSet\Presets;
use Kirby\Plugins\ImageSet\Utils;
 
/**
 * Helper function for using imageset in templates.
 */
function imageset($image, $sizes = 'default', $options = null) {
  return (new ImageSetClass($image, $sizes, $options));
}
 
// Register file helper method.
file::$methods['imageset'] = function($file, $sizes = 'default', $options = null) {
  return (new ImageSetClass($file, $sizes, $options));
};
 
file::$methods['alpha'] = function($file) {
  return utils::hasTransparency($file);
};
 
file::$methods['dominantColor'] = function($file) {
  return utils::dominantColor($file);
};
 
class imageset {
  
  /**
   * API functions for getting/setting presets.
   */
  public static function presets($action, $value = null) {
    if($action === 'reset') {
      return presets::reset();
    } else if($action === 'load') {
      return presets::load($value);
    } else if($action === 'save') {
      return presets::save($value);
    } else if($action === 'clear') {
      return presets::clear();
/
home
/
ski2freedom
/
public_html
/
site
/
templates
/
blog.php
    ?>
 
    <div class="results">
    <?php foreach($articles as $article): ?>
        <article>
            <header>
                <h2><a href="<?php echo $article->url() ?>"><?php echo html($article->title()) ?></a></h2>
                <div class="meta">
                    <time datetime="<?php echo $article->date('c') ?>"><?php echo $article->date('F dS, Y'); ?></time>
                    <?php if ($article->tags() != ''): ?>
                    <ul class="tags">
                        <?php foreach(str::split($article->tags()) as $tag): ?>
                        <li><a href="<?php echo url('en/blog/tag:' . urlencode($tag))?>">#<?php echo $tag; ?></a></li>
                        <?php endforeach ?>
                      </ul>
                      <?php endif ?>
                      <?php if($article->image('intro-slide.jpg') == (true)):  ?>
                      <a href="<?php echo $article->url() ?>">
                        <?= imageset($article->image('intro-slide.jpg'), [
                         [ '300x100-900x300,5', 'media' => '(min-aspect-ratio: 3/2)' ],
                         [ '320x200-800x500,5' ],
                     ]); ?>
                      </a>
                <?php endif ?>
                </div>
            </header>
            <p><?php echo excerpt($article->text(), 400) ?>
 
        </article>
    <?php endforeach ?>
    </div>
 
    <?php else: // show latest articles ?>
        <?php $articles = $pages->find('blog')->children()->visible()->sortBy('date', 'desc')->paginate(10) ?>
        <?php foreach($articles as $article): // article overview ?>
            <article>
                <header>
                    <h2><a href="<?php echo $article->url() ?>"><?php echo html($article->title()) ?></a></h2>
                    <div class="meta">
                        <time datetime="<?php echo $article->date('c') ?>"><?php echo $article->date('F dS, Y'); ?></time>
/
home
/
ski2freedom
/
public_html
/
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;
  }
 
}
/
home
/
ski2freedom
/
public_html
/
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;
 
  }
 
}
 
/
home
/
ski2freedom
/
public_html
/
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
   */
/
home
/
ski2freedom
/
public_html
/
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() {
/
home
/
ski2freedom
/
public_html
/
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;
    }
 
  }
 
}
/
home
/
ski2freedom
/
public_html
/
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
   */
/
home
/
ski2freedom
/
public_html
/
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.10
Kirby CMS v2.5.10
empty
empty
empty
empty
empty
Key Value
USER ski2freedom
HOME /home/ski2freedom
SCRIPT_NAME /index.php
REQUEST_URI /en/blog/tag:france
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/2.0
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /en/blog/tag:france
REMOTE_PORT 59570
SCRIPT_FILENAME /home/ski2freedom/public_html/index.php
SERVER_ADMIN root@localhost
CONTEXT_DOCUMENT_ROOT /home/ski2freedom/public_html
CONTEXT_PREFIX
REQUEST_SCHEME https
DOCUMENT_ROOT /home/ski2freedom/public_html
REMOTE_ADDR 34.204.181.19
SERVER_PORT 443
SERVER_ADDR 192.168.0.114
SERVER_NAME ski2freedom.com
SERVER_SOFTWARE Apache
SERVER_SIGNATURE
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
HTTP_HOST ski2freedom.com
HTTP_REFERER http://ski2freedom.com/en/blog/tag:france
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
proxy-nokeepalive 1
H2_STREAM_TAG 000
H2_STREAM_ID
H2_PUSHED_ON
H2_PUSHED
H2_PUSH off
H2PUSH off
HTTP2 on
SSL_TLS_SNI ski2freedom.com
HTTPS on
UNIQUE_ID ZflgeIhrO@PP7Zvq8kVr@QAAUQU
REDIRECT_STATUS 200
REDIRECT_H2_STREAM_TAG 000
REDIRECT_H2_STREAM_ID
REDIRECT_H2_PUSHED_ON
REDIRECT_H2_PUSHED
REDIRECT_H2_PUSH off
REDIRECT_H2PUSH off
REDIRECT_HTTP2 on
REDIRECT_SSL_TLS_SNI ski2freedom.com
REDIRECT_HTTPS on
REDIRECT_UNIQUE_ID ZflgeIhrO@PP7Zvq8kVr@QAAUQU
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1710841976.8629
REQUEST_TIME 1710841976
empty
0. Whoops\Handler\PrettyPageHandler