Error
Call to a member function url() on bool Error thrown with message "Call to a member function url() on bool" Stacktrace: #9 Error in /web/htdocs1/anymadestudiocom/home/www/site/snippets/header.php:8 #8 require in /web/htdocs1/anymadestudiocom/home/www/kirby/vendor/getkirby/toolkit/lib/tpl.php:22 #7 Tpl:load in /web/htdocs1/anymadestudiocom/home/www/kirby/kirby/component/snippet.php:38 #6 Kirby\Component\Snippet:render in /web/htdocs1/anymadestudiocom/home/www/kirby/helpers.php:12 #5 snippet in /web/htdocs1/anymadestudiocom/home/www/site/templates/gallery.php:1 #4 require in /web/htdocs1/anymadestudiocom/home/www/kirby/vendor/getkirby/toolkit/lib/tpl.php:22 #3 Tpl:load in /web/htdocs1/anymadestudiocom/home/www/site/config/config.php:60 #2 Kirby:{closure} in /web/htdocs1/anymadestudiocom/home/www/kirby/vendor/getkirby/toolkit/helpers.php:282 #1 call in /web/htdocs1/anymadestudiocom/home/www/kirby/kirby.php:743 #0 Kirby:launch in /web/htdocs1/anymadestudiocom/home/www/index.php:16
Stack frames (10)
9
Error
/
web
/
htdocs1
/
anymadestudiocom
/
home
/
www
/
site
/
snippets
/
header.php
8
8
require
/
vendor
/
getkirby
/
toolkit
/
lib
/
tpl.php
22
7
Tpl
load
/
kirby
/
component
/
snippet.php
38
6
Kirby
\
Component
\
Snippet
render
/
helpers.php
12
5
snippet
/
web
/
htdocs1
/
anymadestudiocom
/
home
/
www
/
site
/
templates
/
gallery.php
1
4
require
/
vendor
/
getkirby
/
toolkit
/
lib
/
tpl.php
22
3
Tpl
load
/
web
/
htdocs1
/
anymadestudiocom
/
home
/
www
/
site
/
config
/
config.php
60
2
Kirby
{closure}
/
vendor
/
getkirby
/
toolkit
/
helpers.php
282
1
call
/
kirby.php
743
0
Kirby
launch
/
web
/
htdocs1
/
anymadestudiocom
/
home
/
www
/
index.php
16
/
web
/
htdocs1
/
anymadestudiocom
/
home
/
www
/
site
/
snippets
/
header.php
<!doctype html>
<html lang="<?= site()->language()->code() ?>">
<head>
 
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
 
    <meta property="og:url" content="<?= $page->url() ?>" />
    <meta property="og:type" content="website" />
    <meta property="og:site_name" content="<?= $site->title()->html() ?>" />
 
    <?php if($page->isHomepage()): ?>
        <title><?= $site->title()->html() ?></title>
        <meta property="og:title" content="<?= $site->title()->html() ?>" />
    <?php else: ?>
        <title><?= $page->title()->html() ?> | <?= $site->title()->html() ?></title>
        <meta property="og:title" content="<?= $page->title()->html() ?> | <?= $site->title()->html() ?>" />
    <?php endif; ?>
 
    <?php if($page->intendedTemplate() == 'modular'): ?>
        <meta name="description" content="<?= $page->text()->excerpt(160) ?>">
        <meta property="og:description" content="<?= $page->text()->excerpt(160) ?>" />
    <?php else: ?>
        <meta name="description" content="<?= $site->description()->html() ?>">
        <meta property="og:description" content="<?= $site->description()->html() ?>" />
    <?php endif; ?>
 
    <?php if($page->intendedTemplate() == 'modular'): ?>
        <?php if($intro = $page->headerimage()->toFile()): ?>
            <meta property="og:image" content="<?= $intro->crop(1200, 800, 95)->url(); ?>" />
        <?php endif; ?>
    <?php else: ?>
        <?php $latestProject = $site->index()->filterBy('intendedTemplate', 'modular')->visible()->first(); ?>
        <?php if($intro = $latestProject->headerimage()->toFile()): ?>
            <meta property="og:image" content="<?= $intro->crop(1200, 800, 95)->url(); ?>" />
        <?php endif; ?>
    <?php endif; ?>
 
    <?= css('assets/css/fonts.css') ?>
    <?= css('assets/sass/main.css') ?>
/
web
/
htdocs1
/
anymadestudiocom
/
home
/
www
/
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;
  }
 
}
/
web
/
htdocs1
/
anymadestudiocom
/
home
/
www
/
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);
  }
 
}
/
web
/
htdocs1
/
anymadestudiocom
/
home
/
www
/
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
/
web
/
htdocs1
/
anymadestudiocom
/
home
/
www
/
site
/
templates
/
gallery.php
<?php snippet('header', ['site' => $site, 'page' => $page]); ?>
 
<?php snippet('menu_gallery', ['site' => $site, 'page' => $page]); ?>
<style type="text/css">
            .page-container.fullscreen section.image {
                background-size: cover;
                <?php if($page->bgcolor()->isNotEmpty()): ?>
                    background-color: <?= $page->bgcolor() ?>;
                <?php endif; ?>
            }
</style>
<div class="page-container fullscreen is-faded">
    <?php
        if($page->intendedTemplate() == 'modular') {
            $images = $page->moduleList()->images();
            $first = $images->first();
            $index = 0;
 
        } else {
            $images = $page->images()->sortBy('sort', 'asc')->slice(1);
            $first = $images->first();
            $index = 0;
        }
 
    ?>
    <?php foreach($images as $image): ?>
        <style type="text/css">
            section#<?= $image->name(); ?> {
                background-image: url('<?= $image->resize(600)->url(); ?>');
                <?php if($image->isPortrait()): ?>
                background-size: contain;
                <?php endif; ?>
            }
            @media (min-width: 600px) {
                section#<?= $image->name(); ?> {
                    background-image: url('<?= $image->resize(1200)->url(); ?>');
                }
            }
            @media (min-width: 1200px) {
                section#<?= $image->name(); ?> {
/
web
/
htdocs1
/
anymadestudiocom
/
home
/
www
/
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;
  }
 
}
/
web
/
htdocs1
/
anymadestudiocom
/
home
/
www
/
site
/
config
/
config.php
    'name'    => 'English',
    'default' => true,
    'locale'  => 'en_US',
    'url'     => '/',
  ),
));
 
c::set('routes', array(
    array(
      'pattern' => 'projects/(:any)/gallery',
      'action'  => function($project) {
          // $page = kirby()->site()->index()->find($project);
        // $site = kirby()->site();
 
 
        tpl::load(kirby()->roots()->templates() . DS . 'gallery.php', [
          'site' => site(),
          // 'page'  => $page = kirby()->site()->index()->findBy('uid', $project)
          'page'  => page('projects/' . $project)
        ], false);
      }
    )
));
/
web
/
htdocs1
/
anymadestudiocom
/
home
/
www
/
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);
/
web
/
htdocs1
/
anymadestudiocom
/
home
/
www
/
kirby
/
kirby.php
 
    // load all plugins
    $this->plugins();
 
    // start the router
    $this->router = new Router($this->routes());
    $this->route  = $this->router->run(trim($this->path(), '/'));
 
    // 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;
 
/
web
/
htdocs1
/
anymadestudiocom
/
home
/
www
/
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.13
Kirby CMS v2.5.13
empty
empty
empty
empty
empty
Key Value
PATH /sbin:/usr/sbin:/bin:/usr/bin
DOCUMENT_ROOT /web/htdocs1/anymadestudiocom/home/www
PHPRC /web/htdocs1/anymadestudiocom/php.ini
MAGICK_THREAD_LIMIT 1
HTTP_CONNECTION close
SCRIPT_NAME /index.php
REQUEST_URI /projects/theory/gallery
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.1
GATEWAY_INTERFACE CGI/1.1
SSL_TLS_SNI anymadestudio.com
HTTPS on
GEOIP_COUNTRY_NAME United States
GEOIP_COUNTRY_CODE US
GEOIP_CONTINENT_CODE NA
GEOIP_ADDR 54.205.238.173
REDIRECT_URL /projects/theory/gallery
REMOTE_PORT 37380
SCRIPT_FILENAME /web/htdocs1/anymadestudiocom/home/www/index.php
SERVER_ADMIN admin@forpsi.com
REMOTE_ADDR 54.205.238.173
SERVER_PORT 443
SERVER_ADDR 81.2.194.241
SERVER_NAME anymadestudio.com
SERVER_SOFTWARE Apache
SERVER_SIGNATURE <address>Apache Server at anymadestudio.com Port 443</address>
HTTP_GEOIP_COUNTRY_NAME United States
HTTP_GEOIP_COUNTRY_CODE US
HTTP_GEOIP_CONTINENT_CODE NA
HTTP_GEOIP_ADDR 54.205.238.173
HTTP_HOST anymadestudio.com
HTTP_REFERER http://anymadestudio.com/projects/theory/gallery
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
UNIQUE_ID ZgXq838AAAEABNXdBZsAAAJg
REDIRECT_STATUS 200
REDIRECT_SSL_TLS_SNI anymadestudio.com
REDIRECT_HTTPS on
REDIRECT_GEOIP_COUNTRY_NAME United States
REDIRECT_GEOIP_COUNTRY_CODE US
REDIRECT_GEOIP_CONTINENT_CODE NA
REDIRECT_GEOIP_ADDR 54.205.238.173
REDIRECT_REMOTE_PORT 37380
REDIRECT_SCRIPT_FILENAME
REDIRECT_SERVER_ADMIN admin@forpsi.com
REDIRECT_DOCUMENT_ROOT /web/htdocs1/anymadestudiocom/home/www
REDIRECT_REMOTE_ADDR 54.205.238.173
REDIRECT_SERVER_PORT 443
REDIRECT_SERVER_ADDR 81.2.194.241
REDIRECT_SERVER_NAME anymadestudio.com
REDIRECT_SERVER_SOFTWARE Apache
REDIRECT_SERVER_SIGNATURE <address>Apache Server at anymadestudio.com Port 443</address>
REDIRECT_PATH /sbin:/usr/sbin:/bin:/usr/bin
REDIRECT_HTTP_HOST anymadestudio.com
REDIRECT_HTTP_REFERER http://anymadestudio.com/projects/theory/gallery
REDIRECT_HTTP_USER_AGENT claudebot
REDIRECT_HTTP_ACCEPT */*
REDIRECT_UNIQUE_ID ZgXq838AAAEABNXdBZsAAAJg
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711663859.1557
REQUEST_TIME 1711663859
argv Array ( )
argc 0
empty
0. Whoops\Handler\PrettyPageHandler