Twig \ Error \ RuntimeError
An exception has been thrown during the rendering of a template ("Array to string conversion").
Previous exceptions
  • Array to string conversion (8)
Twig\Error\RuntimeError thrown with message "An exception has been thrown during the rendering of a template ("Array to string conversion")." Stacktrace: #30 Twig\Error\RuntimeError in /home/warfarehistory/public_html/wp-content/themes/g5_hydrogen/custom/views/partials/meta.html.twig:8 #29 Whoops\Exception\ErrorException in /home/warfarehistory/public_html/wp-content/cache/gantry5/g5_hydrogen/twig/29/29d8f7289afb9dffbdb4f6668b65a11379c3461ee0a80d5f4809036894ba2015.php:42 #28 Gantry\Component\Whoops\SystemFacade:handleError in /home/warfarehistory/public_html/wp-content/cache/gantry5/g5_hydrogen/twig/29/29d8f7289afb9dffbdb4f6668b65a11379c3461ee0a80d5f4809036894ba2015.php:42 #27 __TwigTemplate_6a1ef8ded648c9fae891718e6f2de7609e3efbc46c7588e3fa3915772ced82c1:doDisplay in /home/warfarehistory/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:455 #26 Twig\Template:displayWithErrorHandling in /home/warfarehistory/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:422 #25 Twig\Template:display in /home/warfarehistory/public_html/wp-content/cache/gantry5/g5_hydrogen/twig/e7/e75d57556d541ca85d9ae660cdd994effcc07ae7e980d950df607037e8e9631f.php:96 #24 __TwigTemplate_1f829caf9fb1466abbe940f2358beb81bf9f8ba5cd63245cb6de17091db105f4:block_content in /home/warfarehistory/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:216 #23 Twig\Template:displayBlock in /home/warfarehistory/public_html/wp-content/cache/gantry5/g5_hydrogen/twig/e7/e75d57556d541ca85d9ae660cdd994effcc07ae7e980d950df607037e8e9631f.php:41 #22 __TwigTemplate_1f829caf9fb1466abbe940f2358beb81bf9f8ba5cd63245cb6de17091db105f4:doDisplay in /home/warfarehistory/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:455 #21 Twig\Template:displayWithErrorHandling in /home/warfarehistory/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:422 #20 Twig\Template:display in /home/warfarehistory/public_html/wp-content/cache/gantry5/g5_hydrogen/twig/df/df0da37eb66e1e90517225416cc1633b27df559c310247742597cc2e67b532d3.php:54 #19 __TwigTemplate_1f9e84277f96b3e2dea667f6a4468316cb323342c6833564b08aac55ee42d6a1:block_content in /home/warfarehistory/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:216 #18 Twig\Template:displayBlock in /home/warfarehistory/public_html/wp-content/cache/gantry5/g5_hydrogen/twig/43/43121b86ecc06591bdbb2e2efacbf8c7b07538714011167394fc6abf1d7e26b3.php:55 #17 __TwigTemplate_590947ab5dc8520330611a80f4f6e383a70a26fc8f8f25c9d6f77aa8513a359e:doDisplay in /home/warfarehistory/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:455 #16 Twig\Template:displayWithErrorHandling in /home/warfarehistory/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:422 #15 Twig\Template:display in /home/warfarehistory/public_html/wp-content/cache/gantry5/g5_hydrogen/twig/ff/ff91235ffd63f48512833d93e84a4f20ed44a6292652e29101bf0282e7ad31d4.php:36 #14 __TwigTemplate_2d85690fefd195a780dccb6a6275dc8de73cb0888c49b1a449afec660294e544:doDisplay in /home/warfarehistory/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:455 #13 Twig\Template:displayWithErrorHandling in /home/warfarehistory/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:422 #12 Twig\Template:display in /home/warfarehistory/public_html/wp-content/cache/gantry5/g5_hydrogen/twig/df/df0da37eb66e1e90517225416cc1633b27df559c310247742597cc2e67b532d3.php:40 #11 __TwigTemplate_1f9e84277f96b3e2dea667f6a4468316cb323342c6833564b08aac55ee42d6a1:doDisplay in /home/warfarehistory/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:455 #10 Twig\Template:displayWithErrorHandling in /home/warfarehistory/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:422 #9 Twig\Template:display in /home/warfarehistory/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:434 #8 Twig\Template:render in /home/warfarehistory/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/src/TemplateWrapper.php:47 #7 Twig\TemplateWrapper:render in /home/warfarehistory/public_html/wp-content/plugins/gantry5/src/vendor/timber/timber/lib/Loader.php:79 #6 Timber\Loader:render in /home/warfarehistory/public_html/wp-content/plugins/gantry5/src/vendor/timber/timber/lib/Timber.php:334 #5 Timber\Timber:compile in /home/warfarehistory/public_html/wp-content/plugins/gantry5/src/vendor/timber/timber/lib/Timber.php:383 #4 Timber\Timber:fetch in /home/warfarehistory/public_html/wp-content/plugins/gantry5/src/vendor/timber/timber/lib/Timber.php:410 #3 Timber\Timber:render in /home/warfarehistory/public_html/wp-content/themes/g5_hydrogen/single.php:31 #2 include in /home/warfarehistory/public_html/wp-includes/template-loader.php:106 #1 require_once in /home/warfarehistory/public_html/wp-blog-header.php:19 #0 require in /home/warfarehistory/public_html/index.php:17
Stack frames (31)
30
Twig\Error\RuntimeError
/home/warfarehistory/public_html/wp-content/themes/g5_hydrogen/custom/views/partials/meta.html.twig8
29
Whoops\Exception\ErrorException
/home/warfarehistory/public_html/wp-content/cache/gantry5/g5_hydrogen/twig/29/29d8f7289afb9dffbdb4f6668b65a11379c3461ee0a80d5f4809036894ba2015.php42
28
Gantry\Component\Whoops\SystemFacade handleError
/home/warfarehistory/public_html/wp-content/cache/gantry5/g5_hydrogen/twig/29/29d8f7289afb9dffbdb4f6668b65a11379c3461ee0a80d5f4809036894ba2015.php42
27
__TwigTemplate_6a1ef8ded648c9fae891718e6f2de7609e3efbc46c7588e3fa3915772ced82c1 doDisplay
/vendor/twig/twig/src/Template.php455
26
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php422
25
Twig\Template display
/home/warfarehistory/public_html/wp-content/cache/gantry5/g5_hydrogen/twig/e7/e75d57556d541ca85d9ae660cdd994effcc07ae7e980d950df607037e8e9631f.php96
24
__TwigTemplate_1f829caf9fb1466abbe940f2358beb81bf9f8ba5cd63245cb6de17091db105f4 block_content
/vendor/twig/twig/src/Template.php216
23
Twig\Template displayBlock
/home/warfarehistory/public_html/wp-content/cache/gantry5/g5_hydrogen/twig/e7/e75d57556d541ca85d9ae660cdd994effcc07ae7e980d950df607037e8e9631f.php41
22
__TwigTemplate_1f829caf9fb1466abbe940f2358beb81bf9f8ba5cd63245cb6de17091db105f4 doDisplay
/vendor/twig/twig/src/Template.php455
21
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php422
20
Twig\Template display
/home/warfarehistory/public_html/wp-content/cache/gantry5/g5_hydrogen/twig/df/df0da37eb66e1e90517225416cc1633b27df559c310247742597cc2e67b532d3.php54
19
__TwigTemplate_1f9e84277f96b3e2dea667f6a4468316cb323342c6833564b08aac55ee42d6a1 block_content
/vendor/twig/twig/src/Template.php216
18
Twig\Template displayBlock
/home/warfarehistory/public_html/wp-content/cache/gantry5/g5_hydrogen/twig/43/43121b86ecc06591bdbb2e2efacbf8c7b07538714011167394fc6abf1d7e26b3.php55
17
__TwigTemplate_590947ab5dc8520330611a80f4f6e383a70a26fc8f8f25c9d6f77aa8513a359e doDisplay
/vendor/twig/twig/src/Template.php455
16
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php422
15
Twig\Template display
/home/warfarehistory/public_html/wp-content/cache/gantry5/g5_hydrogen/twig/ff/ff91235ffd63f48512833d93e84a4f20ed44a6292652e29101bf0282e7ad31d4.php36
14
__TwigTemplate_2d85690fefd195a780dccb6a6275dc8de73cb0888c49b1a449afec660294e544 doDisplay
/vendor/twig/twig/src/Template.php455
13
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php422
12
Twig\Template display
/home/warfarehistory/public_html/wp-content/cache/gantry5/g5_hydrogen/twig/df/df0da37eb66e1e90517225416cc1633b27df559c310247742597cc2e67b532d3.php40
11
__TwigTemplate_1f9e84277f96b3e2dea667f6a4468316cb323342c6833564b08aac55ee42d6a1 doDisplay
/vendor/twig/twig/src/Template.php455
10
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php422
9
Twig\Template display
/vendor/twig/twig/src/Template.php434
8
Twig\Template render
/vendor/twig/twig/src/TemplateWrapper.php47
7
Twig\TemplateWrapper render
/vendor/timber/timber/lib/Loader.php79
6
Timber\Loader render
/vendor/timber/timber/lib/Timber.php334
5
Timber\Timber compile
/vendor/timber/timber/lib/Timber.php383
4
Timber\Timber fetch
/vendor/timber/timber/lib/Timber.php410
3
Timber\Timber render
/home/warfarehistory/public_html/wp-content/themes/g5_hydrogen/single.php31
2
include
/home/warfarehistory/public_html/wp-includes/template-loader.php106
1
require_once
/home/warfarehistory/public_html/wp-blog-header.php19
0
require
/home/warfarehistory/public_html/index.php17
{% set twigTemplate = 'meta.html.twig' %}

<div class="entry-meta">


{# Begin Meta - Custom Field Subheading#}
{% if post.meta('subheadline') %}
<div class="subheadline">{{ post.meta('subheadline') }}</div>
{% endif %}
{# End Meta - Custom Field Subheading#}


{# Begin Meta - Custom Field Author Byline #}
{% if post.meta('author_byline') %}
<div class="meta-author">
                <i class="fas fa-pen-nib" aria-hidden="true"></i>
                <span class="author-byline"> {{ post.meta('author_byline') }}</span>
                </div>
{% endif %}
{# End Meta - Custom Field Author Byline #}


    {% block meta %}

        {# Begin Meta - Date #}
        {% if gantry.config.get('content.' ~ scope ~ '.meta-date.enabled', '1') and post.date %}
            <div class="meta-date">
                <i class="fa fa-clock-o" aria-hidden="true"></i>

                {% if gantry.config.get('content.' ~ scope ~ '.meta-date.prefix', '') is not empty %}
                    <span class="meta-prefix">{{ gantry.config.get('content.' ~ scope ~ '.meta-date.prefix', '') ~ ' ' }}</span>
                {% endif %}

                {% if gantry.config.get('content.' ~ scope ~ '.meta-date.link', '1') %}
                    <a href="{{ post.link }}" title="{{ post.title }}" class="meta-date-link">
                        <span class="date">{{ post.date(gantry.config.get('content.' ~ scope ~ '.meta-date.format', 'j F Y')) }}</span>
                    </a>
                {% else %}
                    <span class="date">{{ post.date(gantry.config.get('content.' ~ scope ~ '.meta-date.format', 'j F Y')) }}</span>
                {% endif %}
        $this->blocks = [
            'meta' => [$this, 'block_meta'],
        ];
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        // line 1
        $context["twigTemplate"] = "meta.html.twig";
        // line 2
        echo "
<div class=\"entry-meta\">
 
 
";
        // line 7
        if ($this->getAttribute(($context["post"] ?? null), "meta", [0 => "subheadline"], "method")) {
            // line 8
            echo "<div class=\"subheadline\">";
            echo $this->getAttribute(($context["post"] ?? null), "meta", [0 => "subheadline"], "method");
            echo "</div>
";
        }
        // line 11
        echo "
 
";
        // line 14
        if ($this->getAttribute(($context["post"] ?? null), "meta", [0 => "author_byline"], "method")) {
            // line 15
            echo "<div class=\"meta-author\">
                <i class=\"fas fa-pen-nib\" aria-hidden=\"true\"></i>
\t\t\t\t<span class=\"author-byline\"> ";
            // line 17
            echo $this->getAttribute(($context["post"] ?? null), "meta", [0 => "author_byline"], "method");
            echo "</span>
\t\t\t\t</div>
";
        }
        // line 21
Exception message: Array to string conversion
        $this->blocks = [
            'meta' => [$this, 'block_meta'],
        ];
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        // line 1
        $context["twigTemplate"] = "meta.html.twig";
        // line 2
        echo "
<div class=\"entry-meta\">
 
 
";
        // line 7
        if ($this->getAttribute(($context["post"] ?? null), "meta", [0 => "subheadline"], "method")) {
            // line 8
            echo "<div class=\"subheadline\">";
            echo $this->getAttribute(($context["post"] ?? null), "meta", [0 => "subheadline"], "method");
            echo "</div>
";
        }
        // line 11
        echo "
 
";
        // line 14
        if ($this->getAttribute(($context["post"] ?? null), "meta", [0 => "author_byline"], "method")) {
            // line 15
            echo "<div class=\"meta-author\">
                <i class=\"fas fa-pen-nib\" aria-hidden=\"true\"></i>
\t\t\t\t<span class=\"author-byline\"> ";
            // line 17
            echo $this->getAttribute(($context["post"] ?? null), "meta", [0 => "author_byline"], "method");
            echo "</span>
\t\t\t\t</div>
";
        }
        // line 21
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $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 (\Exception $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;
        }
    }
 
    {
        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()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                echo "                        ";
                echo $this->getAttribute(($context["post"] ?? null), "title", []);
                echo "
                    ";
            }
            // line 16
            echo "                </h2>
            ";
        }
        // line 18
        echo "            ";
        // line 19
        echo "
            ";
        // line 21
        echo "            ";
        if ((((($this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "config", []), "get", [0 => (("content." . ($context["scope"] ?? null)) . ".meta-date.enabled"), 1 => "1"], "method") || $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "config", []), "get", [0 => (("content." . ($context["scope"] ?? null)) . ".meta-author.enabled"), 1 => "1"], "method")) || $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "config", []), "get", [0 => (("content." . ($context["scope"] ?? null)) . ".meta-comments.enabled"), 1 => "1"], "method")) || $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "config", []), "get", [0 => (("content." . ($context["scope"] ?? null)) . ".meta-categories.enabled"), 1 => "1"], "method")) || $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "config", []), "get", [0 => (("content." . ($context["scope"] ?? null)) . ".meta-tags.enabled"), 1 => "0"], "method"))) {
            // line 22
            echo "                ";
            $this->loadTemplate([0 => (("partials/meta-" . ($context["scope"] ?? null)) . ".html.twig"), 1 => "partials/meta.html.twig"], "partials/content-single.html.twig", 22)->display($context);
            // line 23
            echo "            ";
        }
        // line 24
        echo "            ";
        // line 25
        echo "
        </section>
        ";
        // line 28
        echo "
        ";
        // line 30
        echo "        ";
        if ( !call_user_func_array($this->env->getFunction('function')->getCallable(), ["post_password_required", $this->getAttribute(($context["post"] ?? null), "ID", [])])) {
            // line 31
            echo "
            ";
            // line 33
            echo "            <section class=\"entry-content\">
 
        if ($useBlocks && isset($blocks[$name])) {
            $template = $blocks[$name][0];
            $block = $blocks[$name][1];
        } elseif (isset($this->blocks[$name])) {
            $template = $this->blocks[$name][0];
            $block = $this->blocks[$name][1];
        } 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->$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 (\Exception $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 (false !== $parent = $this->getParent($context)) {
            $parent->displayBlock($name, $context, array_merge($this->blocks, $blocks), false);
 
        $this->blocks = [
            'content' => [$this, 'block_content'],
        ];
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        // line 1
        echo "<article class=\"post-type-";
        echo $this->getAttribute(($context["post"] ?? null), "post_type", []);
        echo " ";
        echo $this->getAttribute(($context["post"] ?? null), "class", []);
        echo "\" id=\"post-";
        echo $this->getAttribute(($context["post"] ?? null), "ID", []);
        echo "\">
 
    ";
        // line 3
        $this->displayBlock('content', $context, $blocks);
        // line 77
        echo "
</article>
";
    }
 
    // line 3
    public function block_content($context, array $blocks = [])
    {
        // line 4
        echo "
        ";
        // line 6
        echo "        <section class=\"entry-header\">
 
            ";
        // line 9
        echo "            ";
        if ($this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "config", []), "get", [0 => (("content." . ($context["scope"] ?? null)) . ".title.enabled"), 1 => "1"], "method")) {
            // line 10
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $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 (\Exception $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;
        }
    }
 
    {
        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()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
        $context["twigTemplate"] = "single.html.twig";
        // line 3
        $context["scope"] = "single";
        // line 1
        $this->parent = $this->loadTemplate("partials/page.html.twig", "single.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 5
    public function block_content($context, array $blocks = [])
    {
        // line 6
        echo "
    <div class=\"platform-content\">
        <div class=\"content-wrapper\">
            <section class=\"entry\">
 
                ";
        // line 11
        $this->loadTemplate([0 => (("partials/content-" . ($context["scope"] ?? null)) . ".html.twig"), 1 => "partials/content.html.twig"], "single.html.twig", 11)->display($context);
        // line 12
        echo "
            </section>
        </div> <!-- /content-wrapper -->
    </div>
 
";
    }
 
    public function getTemplateName()
    {
        return "single.html.twig";
    }
 
    public function isTraitable()
    {
        return false;
    }
 
    public function getDebugInfo()
 
        if ($useBlocks && isset($blocks[$name])) {
            $template = $blocks[$name][0];
            $block = $blocks[$name][1];
        } elseif (isset($this->blocks[$name])) {
            $template = $this->blocks[$name][0];
            $block = $this->blocks[$name][1];
        } 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->$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 (\Exception $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 (false !== $parent = $this->getParent($context)) {
            $parent->displayBlock($name, $context, array_merge($this->blocks, $blocks), false);
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        // line 1
        $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "debugger", []), "startTimer", [0 => "render", 1 => "Rendering page"], "method");
        // line 2
        $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "theme", []), "setLayout", [], "method");
        // line 3
        $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "theme", []), "loadAtoms", [], "method");
        // line 4
        $context["segments"] = $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "theme", []), "segments", [], "method");
        // line 6
        ob_start();
        // line 7
        echo "    ";
        if ($this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "theme", []), "hasContent", [], "method")) {
            // line 8
            echo "        ";
            $this->displayBlock('content', $context, $blocks);
            // line 10
            echo "    ";
        }
        $context["content"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
        // line 13
        $context["offcanvas"] = null;
        // line 14
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["segments"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["segment"]) {
            if (($this->getAttribute($context["segment"], "type", []) == "offcanvas")) {
                // line 15
                $context["offcanvas"] = $context["segment"];
            }
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['segment'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 18
        ob_start();
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $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 (\Exception $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;
        }
    }
 
    {
        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()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
    public function __construct(Environment $env)
    {
        parent::__construct($env);
 
        $this->blocks = [
            'page_head' => [$this, 'block_page_head'],
            'page_footer' => [$this, 'block_page_footer'],
        ];
    }
 
    protected function doGetParent(array $context)
    {
        // line 1
        return "@nucleus/page.html.twig";
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        $this->parent = $this->loadTemplate("@nucleus/page.html.twig", "partials/page.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 3
    public function block_page_head($context, array $blocks = [])
    {
        // line 4
        if (($context["page_head"] ?? null)) {
            // line 5
            echo "        ";
            echo ($context["page_head"] ?? null);
            echo "
    ";
        } else {
            // line 7
            echo "        ";
            $this->displayParentBlock("page_head", $context, $blocks);
            echo "
    ";
        }
    }
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $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 (\Exception $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;
        }
    }
 
    {
        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()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
        $this->blocks = [
            'content' => [$this, 'block_content'],
        ];
    }
 
    protected function doGetParent(array $context)
    {
        // line 1
        return "partials/page.html.twig";
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        // line 2
        $context["twigTemplate"] = "single.html.twig";
        // line 3
        $context["scope"] = "single";
        // line 1
        $this->parent = $this->loadTemplate("partials/page.html.twig", "single.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 5
    public function block_content($context, array $blocks = [])
    {
        // line 6
        echo "
    <div class=\"platform-content\">
        <div class=\"content-wrapper\">
            <section class=\"entry\">
 
                ";
        // line 11
        $this->loadTemplate([0 => (("partials/content-" . ($context["scope"] ?? null)) . ".html.twig"), 1 => "partials/content.html.twig"], "single.html.twig", 11)->display($context);
        // line 12
        echo "
            </section>
        </div> <!-- /content-wrapper -->
    </div>
 
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $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 (\Exception $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;
        }
    }
 
    {
        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()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
     * @internal
     */
    public function __construct(Environment $env, Template $template)
    {
        $this->env = $env;
        $this->template = $template;
    }
 
    /**
     * Renders the template.
     *
     * @param array $context An array of parameters to pass to the template
     *
     * @return string The rendered template
     */
    public function render($context = [])
    {
        // using func_get_args() allows to not expose the blocks argument
        // as it should only be used by internal code
        return $this->template->render($context, \func_num_args() > 1 ? func_get_arg(1) : []);
    }
 
    /**
     * Displays the template.
     *
     * @param array $context An array of parameters to pass to the template
     */
    public function display($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_num_args() > 1 ? func_get_arg(1) : []);
    }
 
    /**
     * Checks if a block is defined.
     *
     * @param string $name    The block name
     * @param array  $context An array of parameters to pass to the template
     *
 
        $key = null;
        $output = false;
        if ( false !== $expires ) {
            ksort($data);
            $key = md5($file.json_encode($data));
            $output = $this->get_cache($key, self::CACHEGROUP, $cache_mode);
        }
 
        if ( false === $output || null === $output ) {
            $twig = $this->get_twig();
            if ( strlen($file) ) {
                $loader = $this->get_loader();
                $result = $loader->getCacheKey($file);
                do_action('timber_loader_render_file', $result);
            }
            $data = apply_filters('timber_loader_render_data', $data);
            $data = apply_filters('timber/loader/render_data', $data, $file);
            $template = $twig->load($file);
            $output = $template->render($data);
        }
 
        if ( false !== $output && false !== $expires && null !== $key ) {
            $this->delete_cache();
            $this->set_cache($key, $output, self::CACHEGROUP, $expires, $cache_mode);
        }
        $output = apply_filters('timber_output', $output);
        return apply_filters('timber/output', $output, $data, $file);
    }
 
    protected function delete_cache() {
        Cleaner::delete_transients();
    }
 
    /**
     * 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.
     */
        if ( $via_render ) {
            $file = apply_filters('timber_render_file', $file);
        } else {
            $file = apply_filters('timber_compile_file', $file);
        }
 
        $output = false;
 
        if ($file !== false) {
            if ( is_null($data) ) {
                $data = array();
            }
 
            if ( $via_render ) {
                $data = apply_filters('timber_render_data', $data);
            } else {
                $data = apply_filters('timber_compile_data', $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.' );
        }
 
        do_action('timber_compile_done');
        return $output;
    }
 
    /**
     * Compile a string.
     *
     * @api
     * @example
     * ```php
     * $data = array(
     *     'username' => 'Jane Doe',
     * );
        $twig = $dummy_loader->get_twig();
        $template = $twig->createTemplate($string);
        return $template->render($data);
    }
 
    /**
     * Fetch function.
     *
     * @api
     * @param array|string $filenames  Name of the Twig file to render. If this is an array of files, Timber will
     *                                 render the first file that exists.
     * @param array        $data       Optional. An array of data to use in Twig template.
     * @param bool|int     $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 TimberLoader.
     * @return bool|string The returned output.
     */
    public static function fetch( $filenames, $data = array(), $expires = false, $cache_mode = Loader::CACHE_USE_DEFAULT ) {
        $output = self::compile($filenames, $data, $expires, $cache_mode, true);
        $output = apply_filters('timber_compile_result', $output);
        return $output;
    }
 
    /**
     * Render function.
     *
     * 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 of the Twig file to render. If this is an array of files, Timber will
     *                                 render the first file that exists.
     * @param array        $data       Optional. An array of data to use in Twig template.
     * @param bool|int     $expires    Optional. In seconds. Use false to disable cache altogether. When passed an
     * 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 of the Twig file to render. If this is an array of files, Timber will
     *                                 render the first file that exists.
     * @param array        $data       Optional. An array of data to use in Twig template.
     * @param bool|int     $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 TimberLoader.
     * @return bool|string The echoed output.
     */
    public static function render( $filenames, $data = array(), $expires = false, $cache_mode = Loader::CACHE_USE_DEFAULT ) {
        $output = self::fetch($filenames, $data, $expires, $cache_mode);
        echo $output;
        return $output;
    }
 
    /**
     * Render a string with Twig variables.
     *
     * @api
     * @example
     * ```php
     * $data = array(
     *     'username' => 'Jane Doe',
     * );
     *
     * Timber::render_string( 'Hi {{ username }}, I’m a string with a custom Twig variable', $data );
     * ```
     * @param string $string A string with Twig variables.
     * @param array  $data   An array of data to use in Twig template.
     * @return bool|string
     */
use Timber\Timber;

/*
 * The Template for displaying all single posts
 */

$gantry = Gantry\Framework\Gantry::instance();
$theme  = $gantry['theme'];

// We need to render contents of <head> before plugin content gets added.
$context              = Timber::get_context();
$context['page_head'] = $theme->render('partials/page_head.html.twig', $context);

$post = Timber::query_post();

$context['post'] = $post;
$context['wp_title'] .= ' - ' . $post->title();

Timber::render(['single-' . $post->ID . '.html.twig', 'single-' . $post->post_type . '.html.twig', 'single.html.twig'], $context);
 
            }
 
            break;
        }
    }
 
    if ( ! $template ) {
        $template = get_index_template();
    }
 
    /**
     * Filters the path of the current template before including it.
     *
     * @since 3.0.0
     *
     * @param string $template The path of the template to include.
     */
    $template = apply_filters( 'template_include', $template );
    if ( $template ) {
        include $template;
    } elseif ( current_user_can( 'switch_themes' ) ) {
        $theme = wp_get_theme();
        if ( $theme->errors() ) {
            wp_die( $theme->errors() );
        }
    }
    return;
}
 
<?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';
 
}
 
<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */
 
/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define( 'WP_USE_THEMES', true );
 
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
 

Environment & details:

empty
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE Apache
REQUEST_URI /2019/01/16/when-the-last-banner-falls/
USER warfarehistory
HOME /home/warfarehistory
SCRIPT_NAME /index.php
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.1
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /2019/01/16/when-the-last-banner-falls/
REMOTE_PORT 40946
SCRIPT_FILENAME /home/warfarehistory/public_html/index.php
SERVER_ADMIN webmaster@warfarehistorynetwork.com
CONTEXT_DOCUMENT_ROOT /home/warfarehistory/public_html
CONTEXT_PREFIX
REQUEST_SCHEME https
DOCUMENT_ROOT /home/warfarehistory/public_html
REMOTE_ADDR 18.207.108.182
SERVER_PORT 443
SERVER_ADDR 50.28.78.64
SERVER_NAME warfarehistorynetwork.com
SERVER_SIGNATURE
PATH /usr/local/jdk/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin:/opt/bin
HTTP_X_HTTPS 1
HTTP_CONNECTION Keep-Alive
HTTP_HOST warfarehistorynetwork.com
HTTP_ACCEPT_ENCODING br,gzip
HTTP_IF_MODIFIED_SINCE Sun, 27 Sep 2020 17:16:58 GMT
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
proxy-nokeepalive 1
SSL_TLS_SNI warfarehistorynetwork.com
HTTPS on
SCRIPT_URI https://warfarehistorynetwork.com/2019/01/16/when-the-last-banner-falls/
SCRIPT_URL /2019/01/16/when-the-last-banner-falls/
UNIQUE_ID YAsf9gxoMcWg8Awud@LtCAAAAJg
REDIRECT_STATUS 200
REDIRECT_SSL_TLS_SNI warfarehistorynetwork.com
REDIRECT_HTTPS on
REDIRECT_SCRIPT_URI https://warfarehistorynetwork.com/2019/01/16/when-the-last-banner-falls/
REDIRECT_SCRIPT_URL /2019/01/16/when-the-last-banner-falls/
REDIRECT_UNIQUE_ID YAsf9gxoMcWg8Awud@LtCAAAAJg
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1611341814.8888
REQUEST_TIME 1611341814
argv Array ( )
argc 0
empty
0. Whoops\Handler\PrettyPageHandler