Whoops \ Exception \ ErrorException (E_NOTICE)
Undefined variable: picture Whoops\Exception\ErrorException thrown with message "Undefined variable: picture" Stacktrace: #12 Whoops\Exception\ErrorException in /home/weeklie/apps/weeklie/site/snippets/product.php:16 #11 Whoops\Run:handleError in /home/weeklie/apps/weeklie/site/snippets/product.php:16 #10 require in /home/weeklie/apps/weeklie/kirby/src/Toolkit/Tpl.php:38 #9 Kirby\Toolkit\Tpl:load in /home/weeklie/apps/weeklie/kirby/config/components.php:162 #8 Kirby\Cms\App:{closure} in /home/weeklie/apps/weeklie/kirby/src/Cms/App.php:1192 #7 Kirby\Cms\App:snippet in /home/weeklie/apps/weeklie/kirby/config/helpers.php:683 #6 snippet in /home/weeklie/apps/weeklie/site/templates/delivery.php:114 #5 require in /home/weeklie/apps/weeklie/kirby/src/Toolkit/Tpl.php:38 #4 Kirby\Toolkit\Tpl:load in /home/weeklie/apps/weeklie/kirby/src/Cms/Template.php:168 #3 Kirby\Cms\Template:render in /home/weeklie/apps/weeklie/kirby/src/Cms/Page.php:1130 #2 Kirby\Cms\Page:render in /home/weeklie/apps/weeklie/kirby/src/Cms/App.php:584 #1 Kirby\Cms\App:io in /home/weeklie/apps/weeklie/kirby/src/Cms/App.php:870 #0 Kirby\Cms\App:render in /home/weeklie/apps/weeklie/index.php:5
Stack frames (13)
12
Whoops
\
Exception
\
ErrorException
/
home
/
weeklie
/
apps
/
weeklie
/
site
/
snippets
/
product.php
16
11
Whoops
\
Run
handleError
/
home
/
weeklie
/
apps
/
weeklie
/
site
/
snippets
/
product.php
16
10
require
/
src
/
Toolkit
/
Tpl.php
38
9
Kirby
\
Toolkit
\
Tpl
load
/
config
/
components.php
162
8
Kirby
\
Cms
\
App
{closure}
/
src
/
Cms
/
App.php
1192
7
Kirby
\
Cms
\
App
snippet
/
config
/
helpers.php
683
6
snippet
/
home
/
weeklie
/
apps
/
weeklie
/
site
/
templates
/
delivery.php
114
5
require
/
src
/
Toolkit
/
Tpl.php
38
4
Kirby
\
Toolkit
\
Tpl
load
/
src
/
Cms
/
Template.php
168
3
Kirby
\
Cms
\
Template
render
/
src
/
Cms
/
Page.php
1130
2
Kirby
\
Cms
\
Page
render
/
src
/
Cms
/
App.php
584
1
Kirby
\
Cms
\
App
io
/
src
/
Cms
/
App.php
870
0
Kirby
\
Cms
\
App
render
/
home
/
weeklie
/
apps
/
weeklie
/
index.php
5
/
home
/
weeklie
/
apps
/
weeklie
/
site
/
snippets
/
product.php
<a class="deliveries__item product" href="<?= $item->url() ?>">
 
    <div class="product__panel">
 
        <h2 class="product__heading">
            <?= $item->title() ?>
        </h2>
 
        <div class="product__location">
        <?= $item->location() ?>
        </div>
 
 
 
 
        <?php if( $image = $item->image($picture) ) { ?>
            <div class="product__image">
                <img src="<?= $image->resize(600)->url() ?>" alt="">
            </div>
        <?php } ?>
 
 
        <?php if($item->day()->isNotEmpty()) : ?>
        <div class="product__days">
        Delivered on:<br> 
        <strong><?= $item->day() ?></strong>
        </div>
        <?php endif; ?>
 
 
        <div class="product__description">
        <?= $item->caption() ?>
        </div>
 
        
 
    </div>
</a>
/
home
/
weeklie
/
apps
/
weeklie
/
site
/
snippets
/
product.php
<a class="deliveries__item product" href="<?= $item->url() ?>">
 
    <div class="product__panel">
 
        <h2 class="product__heading">
            <?= $item->title() ?>
        </h2>
 
        <div class="product__location">
        <?= $item->location() ?>
        </div>
 
 
 
 
        <?php if( $image = $item->image($picture) ) { ?>
            <div class="product__image">
                <img src="<?= $image->resize(600)->url() ?>" alt="">
            </div>
        <?php } ?>
 
 
        <?php if($item->day()->isNotEmpty()) : ?>
        <div class="product__days">
        Delivered on:<br> 
        <strong><?= $item->day() ?></strong>
        </div>
        <?php endif; ?>
 
 
        <div class="product__description">
        <?= $item->caption() ?>
        </div>
 
        
 
    </div>
</a>
/
home
/
weeklie
/
apps
/
weeklie
/
kirby
/
src
/
Toolkit
/
Tpl.php
    /**
     * Renders the template
     *
     * @param string $__file
     * @param array $__data
     * @return string
     */
    public static function load(string $__file = null, array $__data = []): string
    {
        if (file_exists($__file) === false) {
            return '';
        }
 
        $exception = null;
 
        ob_start();
        extract($__data);
 
        try {
            require $__file;
        } catch (Throwable $e) {
            $exception = $e;
        }
 
        $content = ob_get_contents();
        ob_end_clean();
 
        if ($exception === null) {
            return $content;
        }
 
        throw $exception;
    }
}
 
/
home
/
weeklie
/
apps
/
weeklie
/
kirby
/
config
/
components.php
     * @param array $data Data array for the snippet
     * @return string|null
     */
    'snippet' => function (App $kirby, $name, array $data = []): ?string {
        $snippets = A::wrap($name);
 
        foreach ($snippets as $name) {
            $name = (string)$name;
            $file = $kirby->root('snippets') . '/' . $name . '.php';
 
            if (file_exists($file) === false) {
                $file = $kirby->extensions('snippets')[$name] ?? null;
            }
 
            if ($file) {
                break;
            }
        }
 
        return Snippet::load($file, $data);
    },
 
    /**
     * Add your own template engine
     *
     * @param Kirby\Cms\App $kirby Kirby instance
     * @param string $name Template name
     * @param string $type Extension type
     * @param string $defaultType Default extension type
     * @return Kirby\Cms\Template
     */
    'template' => function (App $kirby, string $name, string $type = 'html', string $defaultType = 'html') {
        return new Template($name, $type, $defaultType);
    },
 
    /**
     * Add your own thumb generator
     *
     * @param Kirby\Cms\App $kirby Kirby instance
     * @param string $src The root of the original file
/
home
/
weeklie
/
apps
/
weeklie
/
kirby
/
src
/
Cms
/
App.php
    {
        $options = $this->option('smartypants', []);
 
        if ($options === true) {
            $options = [];
        }
 
        return $this->component('smartypants')($this, $text, $options);
    }
 
    /**
     * Uses the snippet component to create
     * and return a template snippet
     *
     * @internal
     * @return string
     */
    public function snippet($name, array $data = []): ?string
    {
        return $this->component('snippet')($this, $name, array_merge($this->data, $data));
    }
 
    /**
     * System check class
     *
     * @return Kirby\Cms\System
     */
    public function system()
    {
        return $this->system = $this->system ?? new System($this);
    }
 
    /**
     * Uses the template component to initialize
     * and return the Template object
     *
     * @internal
     * @return Kirby\Cms\Template
     */
    public function template(string $name, string $type = 'html', string $defaultType = 'html')
/
home
/
weeklie
/
apps
/
weeklie
/
kirby
/
config
/
helpers.php
function smartypants(string $text = null): string
{
    return App::instance()->smartypants($text);
}
 
/**
 * Embeds a snippet from the snippet folder
 *
 * @param string|array $name
 * @param array|object $data
 * @param boolean $return
 * @return string
 */
function snippet($name, $data = [], bool $return = false)
{
    if (is_object($data) === true) {
        $data = ['item' => $data];
    }
 
    $snippet = App::instance()->snippet($name, $data);
 
    if ($return === true) {
        return $snippet;
    }
 
    echo $snippet;
}
 
/**
 * Includes an SVG file by absolute or
 * relative file path.
 *
 * @param string $file
 * @return string
 */
function svg(string $file)
{
    $extension = F::extension($file);
 
    // check for valid svg files
/
home
/
weeklie
/
apps
/
weeklie
/
site
/
templates
/
delivery.php
 
 
        </div>
        
 
        <div class="deliveries">
 
        <div class="section section--grey deliveries__heading">
            <div class="copy text-center">
                <p><strong>Produce</strong></p>
            </div>
        </div>
 
        <?php 
        $p = page('produce');
        foreach ($items = $p->children()->visible() as $item): ?>            
 
          
 
                <?php snippet('product', ['item' => $item]); ?>
 
        <?php endforeach ?>
 
 
      
 
        </div>
 
 
 
<?php snippet('footer') ?>
 
/
home
/
weeklie
/
apps
/
weeklie
/
kirby
/
src
/
Toolkit
/
Tpl.php
    /**
     * Renders the template
     *
     * @param string $__file
     * @param array $__data
     * @return string
     */
    public static function load(string $__file = null, array $__data = []): string
    {
        if (file_exists($__file) === false) {
            return '';
        }
 
        $exception = null;
 
        ob_start();
        extract($__data);
 
        try {
            require $__file;
        } catch (Throwable $e) {
            $exception = $e;
        }
 
        $content = ob_get_contents();
        ob_end_clean();
 
        if ($exception === null) {
            return $content;
        }
 
        throw $exception;
    }
}
 
/
home
/
weeklie
/
apps
/
weeklie
/
kirby
/
src
/
Cms
/
Template.php
        }
    }
 
    /**
     * Returns the template name
     *
     * @return string
     */
    public function name(): string
    {
        return $this->name;
    }
 
    /**
     * @param array $data
     * @return string
     */
    public function render(array $data = []): string
    {
        return Tpl::load($this->file(), $data);
    }
 
    /**
     * Returns the root to the templates directory
     *
     * @return string
     */
    public function root(): string
    {
        return App::instance()->root($this->store());
    }
 
    /**
     * Returns the template type
     *
     * @return string
     */
    public function type(): string
    {
        return $this->type;
/
home
/
weeklie
/
apps
/
weeklie
/
kirby
/
src
/
Cms
/
Page.php
        }
 
        // fetch the page regularly
        if ($html === null) {
            $kirby->data = $this->controller($data, $contentType);
 
            if ($contentType === 'html') {
                $template = $this->template();
            } else {
                $template = $this->representation($contentType);
            }
 
            if ($template->exists() === false) {
                throw new NotFoundException([
                    'key' => 'template.default.notFound'
                ]);
            }
 
            // render the page
            $html = $template->render($kirby->data);
 
            // convert the response configuration to an array
            $response = $kirby->response()->toArray();
 
            // cache the result
            if ($cache !== null) {
                $cache->set($cacheId, [
                    'html'     => $html,
                    'response' => $response
                ]);
            }
        }
 
        return $html;
    }
 
    /**
     * @internal
     * @return Kirby\Cms\Template
     */
/
home
/
weeklie
/
apps
/
weeklie
/
kirby
/
src
/
Cms
/
App.php
        }
 
        // Empty input
        if (empty($input) === true) {
            return $this->io(new NotFoundException());
        }
 
        // Response Configuration
        if (is_a($input, 'Kirby\Cms\Responder') === true) {
            return $input->send();
        }
 
        // Responses
        if (is_a($input, 'Kirby\Http\Response') === true) {
            return $input;
        }
 
        // Pages
        if (is_a($input, 'Kirby\Cms\Page')) {
            $html = $input->render();
 
            if ($input->isErrorPage() === true) {
                if ($response->code() === null) {
                    $response->code(404);
                }
            }
 
            return $response->send($html);
        }
 
        // Files
        if (is_a($input, 'Kirby\Cms\File')) {
            return $response->redirect($input->mediaUrl(), 307)->send();
        }
 
        // Simple HTML response
        if (is_string($input) === true) {
            return $response->send($input);
        }
 
/
home
/
weeklie
/
apps
/
weeklie
/
kirby
/
src
/
Cms
/
App.php
 
        $requestUri  = '/' . $this->request()->url()->path();
        $scriptName  = $_SERVER['SCRIPT_NAME'];
        $scriptFile  = basename($scriptName);
        $scriptDir   = dirname($scriptName);
        $scriptPath  = $scriptFile === 'index.php' ? $scriptDir : $scriptName;
        $requestPath = preg_replace('!^' . preg_quote($scriptPath) . '!', '', $requestUri);
 
        return $this->setPath($requestPath)->path;
    }
 
    /**
     * Returns the Response object for the
     * current request
     *
     * @return Kirby\Http\Response
     */
    public function render(string $path = null, string $method = null)
    {
        return $this->io($this->call($path, $method));
    }
 
    /**
     * Returns the Request singleton
     *
     * @return Kirby\Http\Request
     */
    public function request()
    {
        return $this->request = $this->request ?? new Request;
    }
 
    /**
     * Path resolver for the router
     *
     * @internal
     * @param string $path
     * @param string|null $language
     * @return mixed
     */
/
home
/
weeklie
/
apps
/
weeklie
/
index.php
<?php
 
require 'kirby/bootstrap.php';
 
echo (new Kirby)->render();
 

Environment & details:

empty
empty
empty
empty
empty
Key Value
PHP_INI_SCAN_DIR /etc/php.d/:/home/weeklie/apps/weeklie/
USER weeklie
HOME /home/weeklie
SCRIPT_NAME /index.php
REQUEST_URI /produce/fresh-egg-pasta
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.1
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /produce/fresh-egg-pasta
REMOTE_PORT 40218
SCRIPT_FILENAME /home/weeklie/apps/weeklie/index.php
SERVER_ADMIN [no address given]
CONTEXT_DOCUMENT_ROOT /home/weeklie/apps/weeklie/
CONTEXT_PREFIX /
REQUEST_SCHEME http
DOCUMENT_ROOT /home/weeklie/apps/weeklie
REMOTE_ADDR 3.80.173.25
SERVER_PORT 80
SERVER_ADDR 127.0.0.1
SERVER_NAME weekl.ie
SERVER_SOFTWARE Apache
SERVER_SIGNATURE <address>Apache Server at weekl.ie Port 80</address>
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
HTTP_CONNECTION upgrade
HTTP_X_FORWARDED_SSL on
HTTP_X_FORWARDED_PROTO https
HTTP_HTTPS on
HTTP_FORWARDED_REQUEST_URI /produce/fresh-egg-pasta
HTTP_X_FORWARDED_SERVER weekl.ie
HTTP_X_FORWARDED_HOST weekl.ie
HTTP_HOST weekl.ie
proxy-nokeepalive 1
HTTP_AUTHORIZATION
HTTPS on
UNIQUE_ID ZgbhlHX05pvzJXdNfIU0FwAAAEY
REDIRECT_STATUS 200
REDIRECT_HTTP_AUTHORIZATION
REDIRECT_HTTPS on
REDIRECT_UNIQUE_ID ZgbhlHX05pvzJXdNfIU0FwAAAEY
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711726996.6845
REQUEST_TIME 1711726996
empty
0. Whoops\Handler\PrettyPageHandler