Twig \ Error \ RuntimeError
An exception has been thrown during the rendering of a template ("Undefined array key "openingTime"") in "partials/structure/location-key-details.twig" at line 152.
Previous exceptions
  • Undefined array key "openingTime" (2)
Twig\Error\RuntimeError thrown with message "An exception has been thrown during the rendering of a template ("Undefined array key "openingTime"") in "partials/structure/location-key-details.twig" at line 152." Stacktrace: #23 Twig\Error\RuntimeError in /home/forge/dev.exploreomaghsperrins.com/public/app/themes/hailstone/views/partials/structure/location-key-details.twig:152 #22 Whoops\Exception\ErrorException in /home/forge/dev.exploreomaghsperrins.com/public/app/Core/Post.php:231 #21 Whoops\Run:handleError in /home/forge/dev.exploreomaghsperrins.com/public/app/Core/Post.php:231 #20 Hailstone\Core\Post:product_opening_hours in /home/forge/dev.exploreomaghsperrins.com/vendor/twig/twig/src/Extension/CoreExtension.php:1928 #19 Twig\Extension\CoreExtension:getAttribute in /home/forge/dev.exploreomaghsperrins.com/vendor/twig/twig/src/Environment.php:420 #18 __TwigTemplate_0b6a15921cb83ba4554b6cafba0812a3:doDisplay in /home/forge/dev.exploreomaghsperrins.com/vendor/twig/twig/src/Template.php:411 #17 Twig\Template:yield in /home/forge/dev.exploreomaghsperrins.com/vendor/twig/twig/src/Environment.php:420 #16 __TwigTemplate_938e3e067ee94bc984881173ead79658:block_content in /home/forge/dev.exploreomaghsperrins.com/vendor/twig/twig/src/Template.php:458 #15 Twig\Template:yieldBlock in /home/forge/dev.exploreomaghsperrins.com/vendor/twig/twig/src/Environment.php:420 #14 __TwigTemplate_b13ed6b0b42b358e6748df9fc4d9a184:doDisplay in /home/forge/dev.exploreomaghsperrins.com/vendor/twig/twig/src/Template.php:411 #13 Twig\Template:yield in /home/forge/dev.exploreomaghsperrins.com/vendor/twig/twig/src/Environment.php:420 #12 __TwigTemplate_938e3e067ee94bc984881173ead79658:doDisplay in /home/forge/dev.exploreomaghsperrins.com/vendor/twig/twig/src/Template.php:411 #11 Twig\Template:yield in /home/forge/dev.exploreomaghsperrins.com/vendor/twig/twig/src/Template.php:366 #10 Twig\Template:display in /home/forge/dev.exploreomaghsperrins.com/vendor/twig/twig/src/Template.php:381 #9 Twig\Template:render in /home/forge/dev.exploreomaghsperrins.com/vendor/twig/twig/src/TemplateWrapper.php:51 #8 Twig\TemplateWrapper:render in /home/forge/dev.exploreomaghsperrins.com/vendor/timber/timber/src/Loader.php:273 #7 Timber\Loader:render_twig_template in /home/forge/dev.exploreomaghsperrins.com/vendor/timber/timber/src/Loader.php:248 #6 Timber\Loader:render_template in /home/forge/dev.exploreomaghsperrins.com/vendor/timber/timber/src/Loader.php:119 #5 Timber\Loader:render in /home/forge/dev.exploreomaghsperrins.com/vendor/timber/timber/src/Timber.php:1508 #4 Timber\Timber:compile in /home/forge/dev.exploreomaghsperrins.com/vendor/timber/timber/src/Timber.php:1701 #3 Timber\Timber:render in /home/forge/dev.exploreomaghsperrins.com/public/app/themes/hailstone/single-product.php:11 #2 include in /home/forge/dev.exploreomaghsperrins.com/public/wp/wp-includes/template-loader.php:132 #1 require_once in /home/forge/dev.exploreomaghsperrins.com/public/wp/wp-blog-header.php:19 #0 require in /home/forge/dev.exploreomaghsperrins.com/public/index.php:25
Stack frames (24)
23
Twig\Error\RuntimeError
/public/app/themes/hailstone/views/partials/structure/location-key-details.twig:152
22
Whoops\Exception\ErrorException
/public/app/Core/Post.php:231
21
Whoops\Run handleError
/public/app/Core/Post.php:231
20
Hailstone\Core\Post product_opening_hours
/vendor/twig/twig/src/Extension/CoreExtension.php:1928
19
Twig\Extension\CoreExtension getAttribute
/vendor/twig/twig/src/Environment.php:420
18
__TwigTemplate_0b6a15921cb83ba4554b6cafba0812a3 doDisplay
/vendor/twig/twig/src/Template.php:411
17
Twig\Template yield
/vendor/twig/twig/src/Environment.php:420
16
__TwigTemplate_938e3e067ee94bc984881173ead79658 block_content
/vendor/twig/twig/src/Template.php:458
15
Twig\Template yieldBlock
/vendor/twig/twig/src/Environment.php:420
14
__TwigTemplate_b13ed6b0b42b358e6748df9fc4d9a184 doDisplay
/vendor/twig/twig/src/Template.php:411
13
Twig\Template yield
/vendor/twig/twig/src/Environment.php:420
12
__TwigTemplate_938e3e067ee94bc984881173ead79658 doDisplay
/vendor/twig/twig/src/Template.php:411
11
Twig\Template yield
/vendor/twig/twig/src/Template.php:366
10
Twig\Template display
/vendor/twig/twig/src/Template.php:381
9
Twig\Template render
/vendor/twig/twig/src/TemplateWrapper.php:51
8
Twig\TemplateWrapper render
/vendor/timber/timber/src/Loader.php:273
7
Timber\Loader render_twig_template
/vendor/timber/timber/src/Loader.php:248
6
Timber\Loader render_template
/vendor/timber/timber/src/Loader.php:119
5
Timber\Loader render
/vendor/timber/timber/src/Timber.php:1508
4
Timber\Timber compile
/vendor/timber/timber/src/Timber.php:1701
3
Timber\Timber render
/public/app/themes/hailstone/single-product.php:11
2
include
/public/wp/wp-includes/template-loader.php:132
1
require_once
/public/wp/wp-blog-header.php:19
0
require
/public/index.php:25
/home/forge/dev.exploreomaghsperrins.com/public/app/themes/hailstone/views/partials/structure/location-key-details.twig
                                                    <td>{{ item.name }}</td>
                                                    <td class="text-center">{{ item.quantity }}</td>
                                                    <td class="text-center">{{ item.minOccupancy }}</td>
                                                    <td class="text-center">{{ item.maxCapacity }}</td>
                                                </tr>
 
                                            {% endfor %}
 
                                        </tbody>
                                    </table>
 
                                {% endif %}
 
                                {% if current_post.listed_facilities %}
 
                                    {% include 'partials/snippets/categories-listed-with-icons.twig' with { 'categories' : current_post.listed_facilities, 'extra_class' : 'mt-5', 'section_title' : 'Features &amp; Facilities' } %}
 
                                {% endif %}
 
                                {% if current_post.product_opening_hours %}
 
                                    <h3 class="mt-5">{{ current_post.post_type == 'event' ? 'Days and Times' : 'Opening Hours' }}</h3>
 
                                    {% for key, item in current_post.product_opening_hours %}
 
                                        {% if key == 'daily' and item.active %}
 
                                            {#% if item.period %}<h4>{{ item.period.start|date('jS F') }} {{ item.period.end|date('jS F') }}</h4>{% endif %#}
 
                                            <ul class="vertical-icons">
 
                                                {% for day_name, slots in item.days %}
 
                                                    <li><strong>{{ day_name }}:</strong>
 
                                                    {% if slots is iterable and slots|length > 1  %}
 
                                                        <ul>
                                                                
                                                            {% for slot in slots %}
Arguments
  1. "An exception has been thrown during the rendering of a template ("Undefined array key "openingTime"") in "partials/structure/location-key-details.twig" at line 152."
    
/home/forge/dev.exploreomaghsperrins.com/public/app/Core/Post.php
                    }
                    elseif ($item['end'] != $output['daily']['period']['end'])
                    {
                        $output['daily']['period']['end'] = $item['end'];
                    }
 
                    foreach($item['days'] as $day)
                    {
                        if (array_key_exists('open', $day) && $day['open'] == true)
                        {
                            $proceed = true;
                            $output['daily']['active'] = true;
                            $day_name = ($day['day'] == 'BankHoliday') ? 'Bank Holidays' : $day['day'];
                            if (array_key_exists('openingTimes', $day))
                            {
                                foreach($day['openingTimes'] as $time)
                                {
                                    $output['daily']['days'][$day_name][] = 
                                    [
                                        'start' => $time['openingTime'],
                                        'end' => $time['closingTime'],
                                    ];
                                }
                            }
                        }
                    }
                    
                }
 
                if (array_key_exists('additionalDescription', $item) && $item['additionalDescription'] != '')
                {
                    $proceed = true;
                    $output['text']['active'] = true;
                    $output['text']['items'][] = $item['additionalDescription'];
                }
            
            }
 
            if ($proceed)
            {
Arguments
  1. "Undefined array key "openingTime""
    
Exception message: Undefined array key "openingTime"
/home/forge/dev.exploreomaghsperrins.com/public/app/Core/Post.php
                    }
                    elseif ($item['end'] != $output['daily']['period']['end'])
                    {
                        $output['daily']['period']['end'] = $item['end'];
                    }
 
                    foreach($item['days'] as $day)
                    {
                        if (array_key_exists('open', $day) && $day['open'] == true)
                        {
                            $proceed = true;
                            $output['daily']['active'] = true;
                            $day_name = ($day['day'] == 'BankHoliday') ? 'Bank Holidays' : $day['day'];
                            if (array_key_exists('openingTimes', $day))
                            {
                                foreach($day['openingTimes'] as $time)
                                {
                                    $output['daily']['days'][$day_name][] = 
                                    [
                                        'start' => $time['openingTime'],
                                        'end' => $time['closingTime'],
                                    ];
                                }
                            }
                        }
                    }
                    
                }
 
                if (array_key_exists('additionalDescription', $item) && $item['additionalDescription'] != '')
                {
                    $proceed = true;
                    $output['text']['active'] = true;
                    $output['text']['items'][] = $item['additionalDescription'];
                }
            
            }
 
            if ($proceed)
            {
/home/forge/dev.exploreomaghsperrins.com/vendor/twig/twig/src/Extension/CoreExtension.php
                if ($isDefinedTest) {
                    return false;
                }
 
                if ($propertyNotAllowedError) {
                    throw $propertyNotAllowedError;
                }
 
                throw $e;
            }
        }
 
        if ($isDefinedTest) {
            return true;
        }
 
        // Some objects throw exceptions when they have __call, and the method we try
        // to call is not supported. If ignoreStrictCheck is true, we should return null.
        try {
            $ret = $object->$method(...$arguments);
        } catch (\BadMethodCallException $e) {
            if ($call && ($ignoreStrictCheck || !$env->isStrictVariables())) {
                return;
            }
            throw $e;
        }
 
        return $ret;
    }
 
    /**
     * Returns the values from a single column in the input array.
     *
     * <pre>
     *  {% set items = [{ 'fruit' : 'apple'}, {'fruit' : 'orange' }] %}
     *
     *  {% set fruits = items|column('fruit') %}
     *
     *  {# fruits now contains ['apple', 'orange'] #}
     * </pre>
/home/forge/dev.exploreomaghsperrins.com/vendor/twig/twig/src/Environment.php
 
            if (!$this->isAutoReload() || $this->isTemplateFresh($name, $this->cache->getTimestamp($key))) {
                $this->cache->load($key);
            }
 
            if (!class_exists($cls, false)) {
                $source = $this->getLoader()->getSourceContext($name);
                $content = $this->compileSource($source);
                if (!isset($this->hotCache[$name])) {
                    $this->cache->write($key, $content);
                    $this->cache->load($key);
                }
 
                if (!class_exists($mainCls, false)) {
                    /* Last line of defense if either $this->bcWriteCacheFile was used,
                     * $this->cache is implemented as a no-op or we have a race condition
                     * where the cache was cleared between the above calls to write to and load from
                     * the cache.
                     */
                    eval('?>'.$content);
                }
 
                if (!class_exists($cls, false)) {
                    throw new RuntimeError(\sprintf('Failed to load Twig template "%s", index "%s": cache might be corrupted.', $name, $index), -1, $source);
                }
            }
        }
 
        $this->extensionSet->initRuntime();
 
        return $this->loadedTemplates[$cls] = new $cls($this);
    }
 
    /**
     * Creates a template from source.
     *
     * This method should not be used as a generic way to load templates.
     *
     * @param string      $template The template source
     * @param string|null $name     An optional name of the template to be used in error messages
/home/forge/dev.exploreomaghsperrins.com/vendor/twig/twig/src/Template.php
 
        $content = '';
        foreach ($this->yield($context) as $data) {
            $content .= $data;
        }
 
        return $content;
    }
 
    /**
     * @return iterable<scalar|\Stringable|null>
     */
    public function yield(array $context, array $blocks = []): iterable
    {
        $context += $this->env->getGlobals();
        $blocks = array_merge($this->blocks, $blocks);
 
        try {
            $this->ensureSecurityChecked();
            yield from $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            $e = new RuntimeError(\sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
/home/forge/dev.exploreomaghsperrins.com/vendor/twig/twig/src/Environment.php
 
            if (!$this->isAutoReload() || $this->isTemplateFresh($name, $this->cache->getTimestamp($key))) {
                $this->cache->load($key);
            }
 
            if (!class_exists($cls, false)) {
                $source = $this->getLoader()->getSourceContext($name);
                $content = $this->compileSource($source);
                if (!isset($this->hotCache[$name])) {
                    $this->cache->write($key, $content);
                    $this->cache->load($key);
                }
 
                if (!class_exists($mainCls, false)) {
                    /* Last line of defense if either $this->bcWriteCacheFile was used,
                     * $this->cache is implemented as a no-op or we have a race condition
                     * where the cache was cleared between the above calls to write to and load from
                     * the cache.
                     */
                    eval('?>'.$content);
                }
 
                if (!class_exists($cls, false)) {
                    throw new RuntimeError(\sprintf('Failed to load Twig template "%s", index "%s": cache might be corrupted.', $name, $index), -1, $source);
                }
            }
        }
 
        $this->extensionSet->initRuntime();
 
        return $this->loadedTemplates[$cls] = new $cls($this);
    }
 
    /**
     * Creates a template from source.
     *
     * This method should not be used as a generic way to load templates.
     *
     * @param string      $template The template source
     * @param string|null $name     An optional name of the template to be used in error messages
/home/forge/dev.exploreomaghsperrins.com/vendor/twig/twig/src/Template.php
            $block = $blocks[$name][1];
        } elseif (isset($this->blocks[$name])) {
            $template = $this->blocks[$name][0];
            $block = $this->blocks[$name][1];
            // expose this template's own blocks so nested block() calls resolve against them when the block is rendered directly (e.g. block(name, template))
            $blocks = array_merge($this->blocks, $blocks);
        } else {
            $template = null;
            $block = null;
        }
 
        // avoid RCEs when sandbox is enabled
        if (null !== $template && !$template instanceof self) {
            throw new \LogicException('A block must be a method on a \Twig\Template instance.');
        }
 
        if (null !== $template) {
            try {
                $template->ensureSecurityChecked();
                yield from $template->$block($context, $blocks);
            } catch (Error $e) {
                if (!$e->getSourceContext()) {
                    $e->setSourceContext($template->getSourceContext());
                }
 
                // this is mostly useful for \Twig\Error\LoaderError exceptions
                // see \Twig\Error\LoaderError
                if (-1 === $e->getTemplateLine()) {
                    $e->guess();
                }
 
                throw $e;
            } catch (\Throwable $e) {
                $e = new RuntimeError(\sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $template->getSourceContext(), $e);
                $e->guess();
 
                throw $e;
            }
        } elseif ($parent = $this->getParent($context)) {
            yield from $parent->unwrap()->yieldBlock($name, $context, array_merge($this->blocks, $blocks), false, $templateContext ?? $this);
/home/forge/dev.exploreomaghsperrins.com/vendor/twig/twig/src/Environment.php
 
            if (!$this->isAutoReload() || $this->isTemplateFresh($name, $this->cache->getTimestamp($key))) {
                $this->cache->load($key);
            }
 
            if (!class_exists($cls, false)) {
                $source = $this->getLoader()->getSourceContext($name);
                $content = $this->compileSource($source);
                if (!isset($this->hotCache[$name])) {
                    $this->cache->write($key, $content);
                    $this->cache->load($key);
                }
 
                if (!class_exists($mainCls, false)) {
                    /* Last line of defense if either $this->bcWriteCacheFile was used,
                     * $this->cache is implemented as a no-op or we have a race condition
                     * where the cache was cleared between the above calls to write to and load from
                     * the cache.
                     */
                    eval('?>'.$content);
                }
 
                if (!class_exists($cls, false)) {
                    throw new RuntimeError(\sprintf('Failed to load Twig template "%s", index "%s": cache might be corrupted.', $name, $index), -1, $source);
                }
            }
        }
 
        $this->extensionSet->initRuntime();
 
        return $this->loadedTemplates[$cls] = new $cls($this);
    }
 
    /**
     * Creates a template from source.
     *
     * This method should not be used as a generic way to load templates.
     *
     * @param string      $template The template source
     * @param string|null $name     An optional name of the template to be used in error messages
/home/forge/dev.exploreomaghsperrins.com/vendor/twig/twig/src/Template.php
 
        $content = '';
        foreach ($this->yield($context) as $data) {
            $content .= $data;
        }
 
        return $content;
    }
 
    /**
     * @return iterable<scalar|\Stringable|null>
     */
    public function yield(array $context, array $blocks = []): iterable
    {
        $context += $this->env->getGlobals();
        $blocks = array_merge($this->blocks, $blocks);
 
        try {
            $this->ensureSecurityChecked();
            yield from $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            $e = new RuntimeError(\sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
/home/forge/dev.exploreomaghsperrins.com/vendor/twig/twig/src/Environment.php
 
            if (!$this->isAutoReload() || $this->isTemplateFresh($name, $this->cache->getTimestamp($key))) {
                $this->cache->load($key);
            }
 
            if (!class_exists($cls, false)) {
                $source = $this->getLoader()->getSourceContext($name);
                $content = $this->compileSource($source);
                if (!isset($this->hotCache[$name])) {
                    $this->cache->write($key, $content);
                    $this->cache->load($key);
                }
 
                if (!class_exists($mainCls, false)) {
                    /* Last line of defense if either $this->bcWriteCacheFile was used,
                     * $this->cache is implemented as a no-op or we have a race condition
                     * where the cache was cleared between the above calls to write to and load from
                     * the cache.
                     */
                    eval('?>'.$content);
                }
 
                if (!class_exists($cls, false)) {
                    throw new RuntimeError(\sprintf('Failed to load Twig template "%s", index "%s": cache might be corrupted.', $name, $index), -1, $source);
                }
            }
        }
 
        $this->extensionSet->initRuntime();
 
        return $this->loadedTemplates[$cls] = new $cls($this);
    }
 
    /**
     * Creates a template from source.
     *
     * This method should not be used as a generic way to load templates.
     *
     * @param string      $template The template source
     * @param string|null $name     An optional name of the template to be used in error messages
/home/forge/dev.exploreomaghsperrins.com/vendor/twig/twig/src/Template.php
 
        $content = '';
        foreach ($this->yield($context) as $data) {
            $content .= $data;
        }
 
        return $content;
    }
 
    /**
     * @return iterable<scalar|\Stringable|null>
     */
    public function yield(array $context, array $blocks = []): iterable
    {
        $context += $this->env->getGlobals();
        $blocks = array_merge($this->blocks, $blocks);
 
        try {
            $this->ensureSecurityChecked();
            yield from $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            $e = new RuntimeError(\sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
/home/forge/dev.exploreomaghsperrins.com/vendor/twig/twig/src/Template.php
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks(): array
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = []): void
    {
        foreach ($this->yield($context, $blocks) as $data) {
            echo $data;
        }
    }
 
    public function render(array $context): string
    {
        if (!$this->useYield) {
            $level = ob_get_level();
            if ($this->env->isDebug()) {
                ob_start();
            } else {
                ob_start(static function () { return ''; });
            }
            try {
                $this->display($context);
            } catch (\Throwable $e) {
                while (ob_get_level() > $level) {
                    ob_end_clean();
                }
 
/home/forge/dev.exploreomaghsperrins.com/vendor/twig/twig/src/Template.php
    }
 
    public function display(array $context, array $blocks = []): void
    {
        foreach ($this->yield($context, $blocks) as $data) {
            echo $data;
        }
    }
 
    public function render(array $context): string
    {
        if (!$this->useYield) {
            $level = ob_get_level();
            if ($this->env->isDebug()) {
                ob_start();
            } else {
                ob_start(static function () { return ''; });
            }
            try {
                $this->display($context);
            } catch (\Throwable $e) {
                while (ob_get_level() > $level) {
                    ob_end_clean();
                }
 
                throw $e;
            }
 
            return ob_get_clean();
        }
 
        $content = '';
        foreach ($this->yield($context) as $data) {
            $content .= $data;
        }
 
        return $content;
    }
 
    /**
/home/forge/dev.exploreomaghsperrins.com/vendor/twig/twig/src/TemplateWrapper.php
 
    /**
     * @return iterable<scalar|\Stringable|null>
     */
    public function stream(array $context = []): iterable
    {
        yield from $this->template->yield($context);
    }
 
    /**
     * @return iterable<scalar|\Stringable|null>
     */
    public function streamBlock(string $name, array $context = []): iterable
    {
        yield from $this->template->yieldBlock($name, $context);
    }
 
    public function render(array $context = []): string
    {
        return $this->template->render($context);
    }
 
    /**
     * @return void
     */
    public function display(array $context = [])
    {
        // using func_get_args() allows to not expose the blocks argument
        // as it should only be used by internal code
        $this->template->display($context, \func_get_args()[1] ?? []);
    }
 
    public function hasBlock(string $name, array $context = []): bool
    {
        return $this->template->hasBlock($name, $context);
    }
 
    /**
     * @return string[] An array of defined template block names
     */
/home/forge/dev.exploreomaghsperrins.com/vendor/timber/timber/src/Loader.php
         *
         * @param string $output
         * @param array  $data
         * @param string $file
         */
        return \apply_filters('timber/output/pre-cache', $output, $data, $file);
    }
 
    /**
     * Render a Twig template.
     *
     * This method can be overridden in subclasses to customize rendering behavior.
     *
     * @param TemplateWrapper $template The Twig template.
     * @param array                  $data     The data to pass to the template.
     * @return string The rendered output.
     */
    protected function render_twig_template($template, $data)
    {
        return $template->render($data);
    }
 
    /**
     * Get first existing template.
     *
     * @param array|string $templates  Name(s) of the Twig template(s) to choose from.
     * @return string|bool             Name of chosen template, otherwise false.
     */
    public function choose_template($templates)
    {
        // Change $templates into array, if needed
        if (!\is_array($templates)) {
            $templates = (array) $templates;
        }
 
        // Get Twig loader
        $loader = $this->get_loader();
 
        // Run through template array
        foreach ($templates as $template) {
/home/forge/dev.exploreomaghsperrins.com/vendor/timber/timber/src/Loader.php
         * @param string $file
         */
        $data = \apply_filters('timber/loader/render_data', $data, $file);
 
        /**
         * Filters …
         *
         * @todo Add summary
         *
         * @deprecated 2.0.0, use `timber/loader/render_data`
         */
        $data = \apply_filters_deprecated(
            'timber_loader_render_data',
            [$data],
            '2.0.0',
            'timber/loader/render_data'
        );
 
        $template = $twig->load($file);
        $output = $this->render_twig_template($template, $data);
 
        /**
         * Filters $output before it is cached.
         *
         * @since 2.1.0
         *
         * @param string $output
         * @param array  $data
         * @param string $file
         */
        return \apply_filters('timber/output/pre-cache', $output, $data, $file);
    }
 
    /**
     * Render a Twig template.
     *
     * This method can be overridden in subclasses to customize rendering behavior.
     *
     * @param TemplateWrapper $template The Twig template.
     * @param array                  $data     The data to pass to the template.
/home/forge/dev.exploreomaghsperrins.com/vendor/timber/timber/src/Loader.php
 
        if ($expires === 0) {
            $expires = false;
        }
 
        $key = null;
        $output = false;
        $cache_hit = false;
        if (false !== $expires) {
            $key = $this->get_cache_key($file, $data);
            if (null !== $key) {
                $output = $this->get_cache($key, self::CACHEGROUP, $cache_mode);
                if (false !== $output && null !== $output) {
                    $cache_hit = true;
                }
            }
        }
 
        if (false === $output || null === $output) {
            $output = $this->render_template($file, $data);
        }
 
        if (!$cache_hit && false !== $output && false !== $expires && null !== $key) {
            $this->delete_cache();
            $this->set_cache($key, $output, self::CACHEGROUP, $expires, $cache_mode);
        }
 
        /**
         * Filters …
         *
         * @todo  Add summary, description, example, parameter descriptions
         *
         * @since 0.20.10
         *
         * @param string $output
         * @param array  $data
         * @param string $file
         */
        $output = \apply_filters('timber/output', $output, $data, $file);
 
/home/forge/dev.exploreomaghsperrins.com/vendor/timber/timber/src/Timber.php
                 * @since 2.0.0
                 *
                 * @param array  $data The data that is used to compile the Twig template.
                 * @param string $file The name of the Twig template to compile.
                 */
                $data = \apply_filters('timber/compile/data', $data, $file);
 
                /**
                 * Filters the data that should be passed for compiling a Twig template.
                 *
                 * @deprecated 2.0.0, use `timber/compile/data`
                 */
                $data = \apply_filters_deprecated(
                    'timber_compile_data',
                    [$data],
                    '2.0.0',
                    'timber/compile/data'
                );
            }
            $output = $loader->render($file, $data, $expires, $cache_mode);
        } else {
            if (\is_array($filenames)) {
                $filenames = \implode(", ", $filenames);
            }
            Helper::error_log('Error loading your template files: ' . $filenames . '. Make sure one of these files exists.');
        }
 
        /**
         * Filters the compiled result before it is returned in `Timber::compile()`.
         *
         * It adds the possibility to filter the output ready for render.
         *
         * @since 2.0.0
         *
         * @param string|bool $output the compiled output.
         */
        $output = \apply_filters('timber/compile/result', $output);
 
        /**
         * Fires after a Twig template was compiled and before the compiled data
/home/forge/dev.exploreomaghsperrins.com/vendor/timber/timber/src/Timber.php
     * Passes data to a Twig file and echoes the output.
     *
     * @api
     * @example
     * ```php
     * $context = Timber::context();
     *
     * Timber::render( 'index.twig', $context );
     * ```
     * @param array|string   $filenames      Name or full path of the Twig file to render. If this is an array of file
     *                                       names or paths, Timber will render the first file that exists.
     * @param array          $data           Optional. An array of data to use in Twig template.
     * @param bool|int|array $expires        Optional. In seconds. Use false to disable cache altogether. When passed an
     *                                       array, the first value is used for non-logged in visitors, the second for users.
     *                                       Default false.
     * @param string         $cache_mode     Optional. Any of the cache mode constants defined in Timber\Loader.
     */
    public static function render($filenames, $data = [], $expires = false, $cache_mode = Loader::CACHE_USE_DEFAULT): void
    {
        $output = self::compile($filenames, $data, $expires, $cache_mode, true);
        echo $output;
    }
 
    /**
     * Renders a Twig block from a Twig file.
     *
     * Passes data to a Twig file and echoes the output of a specific block.
     *
     * @api
     * @param string         $block_name     The name of the block to render.
     * @param array|string   $filenames      Name or full path of the Twig file to render. If this is an array of file
     *                                       names or paths, Timber will render the first file that exists.
     * @param array          $data           Optional. An array of data to use in Twig template.
     * @param string|array|null $caller      Optional. A value produced by a `LocationManager` method to control
     *                                       template lookup. Pass either `LocationManager::get_calling_script_dir()`
     *                                       (string path) or `LocationManager::get_locations()` (array of search
     *                                       locations). When `null`, Timber will default to
     *                                       `LocationManager::get_calling_script_dir(1)`.
     * @param bool|int|array $expires        Optional. In seconds. Use false to disable cache altogether. When passed an
     *                                       array, the first value is used for non-logged in visitors, the second for users.
/home/forge/dev.exploreomaghsperrins.com/public/app/themes/hailstone/single-product.php
<?php use Hailstone\Core\Posts\Product\Product;
 
if (!defined( 'WP_HOME' )) exit;
 
$context = Timber\Timber::context();
$post = Product::buildPost();
$extras = $post->embedExtraScripts(['map', 'gallery']);
$context['extra_partials'] = $extras;
$context['post'] = $post;
 
Timber\Timber::render('single-product.twig', $context);
/home/forge/dev.exploreomaghsperrins.com/public/wp/wp-includes/template-loader.php
     */
    $template   = apply_filters( 'template_include', $template );
    $is_stringy = is_string( $template ) || ( is_object( $template ) && method_exists( $template, '__toString' ) );
    $template   = $is_stringy ? realpath( (string) $template ) : null;
    if (
        is_string( $template ) &&
        ( str_ends_with( $template, '.php' ) || str_ends_with( $template, '.html' ) ) &&
        is_file( $template ) &&
        is_readable( $template )
    ) {
        /**
         * Fires immediately before including the template.
         *
         * @since 6.9.0
         *
         * @param string $template The path of the template about to be included.
         */
        do_action( 'wp_before_include_template', $template );
 
        include $template;
    } elseif ( current_user_can( 'switch_themes' ) ) {
        $theme = wp_get_theme();
        if ( $theme->errors() ) {
            wp_die( $theme->errors() );
        }
    }
    return;
}
 
Arguments
  1. "/home/forge/dev.exploreomaghsperrins.com/public/app/themes/hailstone/single-product.php"
    
/home/forge/dev.exploreomaghsperrins.com/public/wp/wp-blog-header.php
<?php
/**
 * Loads the WordPress environment and template.
 *
 * @package WordPress
 */
 
if ( ! isset( $wp_did_header ) ) {
 
    $wp_did_header = true;
 
    // Load the WordPress library.
    require_once __DIR__ . '/wp-load.php';
 
    // Set up the WordPress query.
    wp();
 
    // Load the theme template.
    require_once ABSPATH . WPINC . '/template-loader.php';
 
}
 
Arguments
  1. "/home/forge/dev.exploreomaghsperrins.com/public/wp/wp-includes/template-loader.php"
    
/home/forge/dev.exploreomaghsperrins.com/public/index.php
|--------------------------------------------------------------------------
|
| This would only be set to false, if, for some reason, you're using
| this as a child theme. In 99.99% of cases, leave this alone.
|
*/
 
define( 'WP_USE_THEMES', true );
 
/*
|--------------------------------------------------------------------------
| Bootstrap Wordpress
|--------------------------------------------------------------------------
|
| Load in the Wordpress boostrapper. This automatically looks for
| and loads wp-config.php. More magic happens in there.
|
*/
 
require( dirname( __FILE__ ) . '/wp/wp-blog-header.php' );
Arguments
  1. "/home/forge/dev.exploreomaghsperrins.com/public/wp/wp-blog-header.php"
    

Environment & details:

empty
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE
"nginx/1.24.0"
REQUEST_URI
"/things-to-do/ulster-american-folk-park/"
USER
"forge"
HOME
"/home/forge"
HTTP_ACCEPT_ENCODING
"gzip, br, zstd, deflate"
HTTP_USER_AGENT
"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)"
HTTP_ACCEPT
"*/*"
HTTP_HOST
"dev.exploreomaghsperrins.com"
REDIRECT_STATUS
"200"
HTTPS
"on"
SERVER_NAME
"dev.exploreomaghsperrins.com"
SERVER_PORT
"443"
SERVER_ADDR
"144.126.206.136"
REMOTE_PORT
"20779"
REMOTE_ADDR
"216.73.216.221"
GATEWAY_INTERFACE
"CGI/1.1"
SERVER_PROTOCOL
"HTTP/2.0"
DOCUMENT_ROOT
"/home/forge/dev.exploreomaghsperrins.com/public"
DOCUMENT_URI
"/index.php"
SCRIPT_NAME
"/index.php"
SCRIPT_FILENAME
"/home/forge/dev.exploreomaghsperrins.com/public/index.php"
CONTENT_LENGTH
""
CONTENT_TYPE
""
REQUEST_METHOD
"GET"
QUERY_STRING
""
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1789265623.6287
REQUEST_TIME
1789265623
APP_DEBUG
"true"
APP_ENV
"local"
APP_URL
"https://dev.exploreomaghsperrins.com"
APP_STAGING_URL
"https://dev_exploreomaghsperrins.com"
APP_LIVE_URL
"https://exploreomaghsperrins.com"
APP_LOCAL_URL
"https://exploreomaghsperrins.local"
DB_NAME
"omaghsperrins_staging_db"
DB_USER
"omaghsperrins_staging_db"
DB_PASSWORD
"x1s1!jjF4f4s76aA"
DB_HOST
"localhost"
DB_PREFIX
"eos_"
AUTH_KEY
""
SECURE_AUTH_KEY
""
LOGGED_IN_KEY
""
NONCE_KEY
""
AUTH_SALT
""
SECURE_AUTH_SALT
""
LOGGED_IN_SALT
""
NONCE_SALT
""
GOOGLE_API_KEY
"AIzaSyBHz72bEnvOy__82B-2I44bNP305tpjZks"
SIMPLEVIEW_URL
"https://webservice.simpleviewtools.com/"
SIMPLEVIEW_USER
"Bearer"
SIMPLEVIEW_PW
"FermanaghLakelandsApiLive41592074273"
Key Value
APP_DEBUG
"true"
APP_ENV
"local"
APP_URL
"https://dev.exploreomaghsperrins.com"
APP_STAGING_URL
"https://dev_exploreomaghsperrins.com"
APP_LIVE_URL
"https://exploreomaghsperrins.com"
APP_LOCAL_URL
"https://exploreomaghsperrins.local"
DB_NAME
"omaghsperrins_staging_db"
DB_USER
"omaghsperrins_staging_db"
DB_PASSWORD
"x1s1!jjF4f4s76aA"
DB_HOST
"localhost"
DB_PREFIX
"eos_"
AUTH_KEY
""
SECURE_AUTH_KEY
""
LOGGED_IN_KEY
""
NONCE_KEY
""
AUTH_SALT
""
SECURE_AUTH_SALT
""
LOGGED_IN_SALT
""
NONCE_SALT
""
GOOGLE_API_KEY
"AIzaSyBHz72bEnvOy__82B-2I44bNP305tpjZks"
SIMPLEVIEW_URL
"https://webservice.simpleviewtools.com/"
SIMPLEVIEW_USER
"Bearer"
SIMPLEVIEW_PW
"FermanaghLakelandsApiLive41592074273"
0. Whoops\Handler\PrettyPageHandler