Twig \ Error \ RuntimeError
An exception has been thrown during the rendering of a template ("call_user_func_array() expects parameter 1 to be a valid callback, function 'simple_fields_values' not found or invalid function name").
Previous exceptions
  • call_user_func_array() expects parameter 1 to be a valid callback, function 'simple_fields_values' not found or invalid function name (2)
Twig\Error\RuntimeError thrown with message "An exception has been thrown during the rendering of a template ("call_user_func_array() expects parameter 1 to be a valid callback, function 'simple_fields_values' not found or invalid function name")." Stacktrace: #23 Twig\Error\RuntimeError in /home/customer/www/snoasthmaandallergy.com/public_html/wp-content/themes/g5_hydrogen2020/views/single-doctor.html.twig:124 #22 Whoops\Exception\ErrorException in /home/customer/www/snoasthmaandallergy.com/public_html/wp-content/plugins/gantry5/src/vendor/timber/timber/lib/Twig.php:309 #21 call_user_func_array in /home/customer/www/snoasthmaandallergy.com/public_html/wp-content/plugins/gantry5/src/vendor/timber/timber/lib/Twig.php:309 #20 Timber\Twig:exec_function in /home/customer/www/snoasthmaandallergy.com/public_html/wp-content/cache/gantry5/g5_hydrogen2020/twig/b8/b8a16d4d7077df602d1a7a29292d421faf3a8ffd8a5d0abac925ffe6ce515fa9.php:263 #19 __TwigTemplate_120a365cc0fc34d6dccf9355e431cc018af68caf4b6f465097077c31795009c2:block_content in /home/customer/www/snoasthmaandallergy.com/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:216 #18 Twig\Template:displayBlock in /home/customer/www/snoasthmaandallergy.com/public_html/wp-content/cache/gantry5/g5_hydrogen2020/twig/61/61c58cc84a35ea59d44c169a2f0b8633c79e365a326158ea07c37fe28cf3e45f.php:55 #17 __TwigTemplate_c39171c94aa4943586990216629e88d5a8c5bbb2f459dbe5df5edd3054dfaf7c:doDisplay in /home/customer/www/snoasthmaandallergy.com/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:455 #16 Twig\Template:displayWithErrorHandling in /home/customer/www/snoasthmaandallergy.com/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:422 #15 Twig\Template:display in /home/customer/www/snoasthmaandallergy.com/public_html/wp-content/cache/gantry5/g5_hydrogen2020/twig/5f/5f1831abbb0c42ec1fbaccda3c573e127263f59df8929ed835e3ff6de4ee0fda.php:36 #14 __TwigTemplate_681a59664ea4fa4a1f90f1a5021809e1a50b3f15f9afadd179cb10cc89aafcd8:doDisplay in /home/customer/www/snoasthmaandallergy.com/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:455 #13 Twig\Template:displayWithErrorHandling in /home/customer/www/snoasthmaandallergy.com/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:422 #12 Twig\Template:display in /home/customer/www/snoasthmaandallergy.com/public_html/wp-content/cache/gantry5/g5_hydrogen2020/twig/b8/b8a16d4d7077df602d1a7a29292d421faf3a8ffd8a5d0abac925ffe6ce515fa9.php:40 #11 __TwigTemplate_120a365cc0fc34d6dccf9355e431cc018af68caf4b6f465097077c31795009c2:doDisplay in /home/customer/www/snoasthmaandallergy.com/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:455 #10 Twig\Template:displayWithErrorHandling in /home/customer/www/snoasthmaandallergy.com/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:422 #9 Twig\Template:display in /home/customer/www/snoasthmaandallergy.com/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:434 #8 Twig\Template:render in /home/customer/www/snoasthmaandallergy.com/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/src/TemplateWrapper.php:47 #7 Twig\TemplateWrapper:render in /home/customer/www/snoasthmaandallergy.com/public_html/wp-content/plugins/gantry5/src/vendor/timber/timber/lib/Loader.php:75 #6 Timber\Loader:render in /home/customer/www/snoasthmaandallergy.com/public_html/wp-content/plugins/gantry5/src/vendor/timber/timber/lib/Timber.php:333 #5 Timber\Timber:compile in /home/customer/www/snoasthmaandallergy.com/public_html/wp-content/plugins/gantry5/src/vendor/timber/timber/lib/Timber.php:377 #4 Timber\Timber:fetch in /home/customer/www/snoasthmaandallergy.com/public_html/wp-content/plugins/gantry5/src/vendor/timber/timber/lib/Timber.php:404 #3 Timber\Timber:render in /home/customer/www/snoasthmaandallergy.com/public_html/wp-content/themes/g5_hydrogen2020/single.php:31 #2 include in /home/customer/www/snoasthmaandallergy.com/public_html/wp-includes/template-loader.php:106 #1 require_once in /home/customer/www/snoasthmaandallergy.com/public_html/wp-blog-header.php:19 #0 require in /home/customer/www/snoasthmaandallergy.com/public_html/index.php:17
Stack frames (24)
23
Twig\Error\RuntimeError
/home/customer/www/snoasthmaandallergy.com/public_html/wp-content/themes/g5_hydrogen2020/views/single-doctor.html.twig124
22
Whoops\Exception\ErrorException
/vendor/timber/timber/lib/Twig.php309
21
call_user_func_array
/vendor/timber/timber/lib/Twig.php309
20
Timber\Twig exec_function
/home/customer/www/snoasthmaandallergy.com/public_html/wp-content/cache/gantry5/g5_hydrogen2020/twig/b8/b8a16d4d7077df602d1a7a29292d421faf3a8ffd8a5d0abac925ffe6ce515fa9.php263
19
__TwigTemplate_120a365cc0fc34d6dccf9355e431cc018af68caf4b6f465097077c31795009c2 block_content
/vendor/twig/twig/src/Template.php216
18
Twig\Template displayBlock
/home/customer/www/snoasthmaandallergy.com/public_html/wp-content/cache/gantry5/g5_hydrogen2020/twig/61/61c58cc84a35ea59d44c169a2f0b8633c79e365a326158ea07c37fe28cf3e45f.php55
17
__TwigTemplate_c39171c94aa4943586990216629e88d5a8c5bbb2f459dbe5df5edd3054dfaf7c doDisplay
/vendor/twig/twig/src/Template.php455
16
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php422
15
Twig\Template display
/home/customer/www/snoasthmaandallergy.com/public_html/wp-content/cache/gantry5/g5_hydrogen2020/twig/5f/5f1831abbb0c42ec1fbaccda3c573e127263f59df8929ed835e3ff6de4ee0fda.php36
14
__TwigTemplate_681a59664ea4fa4a1f90f1a5021809e1a50b3f15f9afadd179cb10cc89aafcd8 doDisplay
/vendor/twig/twig/src/Template.php455
13
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php422
12
Twig\Template display
/home/customer/www/snoasthmaandallergy.com/public_html/wp-content/cache/gantry5/g5_hydrogen2020/twig/b8/b8a16d4d7077df602d1a7a29292d421faf3a8ffd8a5d0abac925ffe6ce515fa9.php40
11
__TwigTemplate_120a365cc0fc34d6dccf9355e431cc018af68caf4b6f465097077c31795009c2 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.php75
6
Timber\Loader render
/vendor/timber/timber/lib/Timber.php333
5
Timber\Timber compile
/vendor/timber/timber/lib/Timber.php377
4
Timber\Timber fetch
/vendor/timber/timber/lib/Timber.php404
3
Timber\Timber render
/home/customer/www/snoasthmaandallergy.com/public_html/wp-content/themes/g5_hydrogen2020/single.php31
2
include
/home/customer/www/snoasthmaandallergy.com/public_html/wp-includes/template-loader.php106
1
require_once
/home/customer/www/snoasthmaandallergy.com/public_html/wp-blog-header.php19
0
require
/home/customer/www/snoasthmaandallergy.com/public_html/index.php17
        </div>
        {% if not endClass1 %}
        <a href="javascript:void(0);" class="move-down"></a>
        {% else %}
        <a href="javascript:void(0);" class="move-top"></a>
        {% endif %}
    </section>
    {% endif %}
    {% if not function('get_field','hide_second_fold') %}
    <section class="section {{endClass2}}" id="section-2">
        <div class="content">
            <div class="container">
                <div class="g-grid">
                    <div class="g-block col-padding size-8-3"></div>
                    <div class="g-block col-padding size-41-7">
                        <div class="p-sec">
                            <h3>Some History</h3>
                            <div class="history">
                                <h5>Career Highlights</h5>
                                {% set Medicines = function('simple_fields_values','m_year,m_degree') %}
                                {% for Medicine in Medicines %}
                                <p class="clearfix"><span>{{Medicine.m_year}}</span><span class="text">{{Medicine.m_degree}}</span></p>
                                {% endfor %}
                            </div>
                            <div class="history">
                                <h5>Education</h5>
                                {% set Dentistries = function('simple_fields_values','d_year,d_degree') %}
                                {% for Dentistry in Dentistries %}
                                <p class="clearfix"><span>{{Dentistry.d_year}}</span><span class="text">{{Dentistry.d_degree}}</span></p>
                                {% endfor %}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        {% if not endClass2 %}
        <a href="javascript:void(0);" class="move-down"></a>
        {% else %}
        <a href="javascript:void(0);" class="move-top"></a>
        if ( is_array($arr) ) {
            return $arr;
        }
        $arr = array($arr);
        return $arr;
    }
 
    /**
     *
     *
     * @param string  $function_name
     * @return mixed
     */
    public function exec_function( $function_name ) {
        $args = func_get_args();
        array_shift($args);
        if ( is_string($function_name) ) {
            $function_name = trim($function_name);
        }
        return call_user_func_array($function_name, ($args));
    }
 
    /**
     *
     *
     * @param string  $content
     * @return string
     */
    public function twig_pretags( $content ) {
        return preg_replace_callback('|<pre.*>(.*)</pre|isU', array(&$this, 'convert_pre_entities'), $content);
    }
 
    /**
     *
     *
     * @param array   $matches
     * @return string
     */
    public function convert_pre_entities( $matches ) {
        return str_replace($matches[1], htmlentities($matches[1]), $matches[0]);
Exception message: call_user_func_array() expects parameter 1 to be a valid callback, function 'simple_fields_values' not found or invalid function name
        if ( is_array($arr) ) {
            return $arr;
        }
        $arr = array($arr);
        return $arr;
    }
 
    /**
     *
     *
     * @param string  $function_name
     * @return mixed
     */
    public function exec_function( $function_name ) {
        $args = func_get_args();
        array_shift($args);
        if ( is_string($function_name) ) {
            $function_name = trim($function_name);
        }
        return call_user_func_array($function_name, ($args));
    }
 
    /**
     *
     *
     * @param string  $content
     * @return string
     */
    public function twig_pretags( $content ) {
        return preg_replace_callback('|<pre.*>(.*)</pre|isU', array(&$this, 'convert_pre_entities'), $content);
    }
 
    /**
     *
     *
     * @param array   $matches
     * @return string
     */
    public function convert_pre_entities( $matches ) {
        return str_replace($matches[1], htmlentities($matches[1]), $matches[0]);
        }
        // line 113
        echo "    ";
        if ( !call_user_func_array($this->env->getFunction('function')->getCallable(), ["get_field", "hide_second_fold"])) {
            // line 114
            echo "    <section class=\"section ";
            echo ($context["endClass2"] ?? null);
            echo "\" id=\"section-2\">
        <div class=\"content\">
            <div class=\"container\">
                <div class=\"g-grid\">
                    <div class=\"g-block col-padding size-8-3\"></div>
                    <div class=\"g-block col-padding size-41-7\">
                        <div class=\"p-sec\">
                            <h3>Some History</h3>
                            <div class=\"history\">
                                <h5>Career Highlights</h5>
                                ";
            // line 124
            $context["Medicines"] = call_user_func_array($this->env->getFunction('function')->getCallable(), ["simple_fields_values", "m_year,m_degree"]);
            // line 125
            echo "                                ";
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(($context["Medicines"] ?? null));
            foreach ($context['_seq'] as $context["_key"] => $context["Medicine"]) {
                // line 126
                echo "                                <p class=\"clearfix\"><span>";
                echo $this->getAttribute($context["Medicine"], "m_year", []);
                echo "</span><span class=\"text\">";
                echo $this->getAttribute($context["Medicine"], "m_degree", []);
                echo "</span></p>
                                ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Medicine'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 128
            echo "                            </div>
                            <div class=\"history\">
                                <h5>Education</h5>
 
        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(function () { return ''; });
        // 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(function () { return ''; });
            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-doctor.html.twig";
        // line 3
        $context["scope"] = "single";
        // line 1
        $this->parent = $this->loadTemplate("partials/page.html.twig", "single-doctor.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 5
    public function block_content($context, array $blocks = [])
    {
        // line 8
        if ((((call_user_func_array($this->env->getFunction('function')->getCallable(), ["get_field", "hide_second_fold"]) && call_user_func_array($this->env->getFunction('function')->getCallable(), ["get_field", "hide_third_fold"])) && call_user_func_array($this->env->getFunction('function')->getCallable(), ["get_field", "hide_fourth_fold"])) && call_user_func_array($this->env->getFunction('function')->getCallable(), ["get_field", "hide_fifth_fold"]))) {
            // line 9
            $context["endClass1"] = "endsection";
        } else {
            // line 11
            $context["endClass1"] = "";
        }
        // line 14
        if (((call_user_func_array($this->env->getFunction('function')->getCallable(), ["get_field", "hide_third_fold"]) && call_user_func_array($this->env->getFunction('function')->getCallable(), ["get_field", "hide_fourth_fold"])) && call_user_func_array($this->env->getFunction('function')->getCallable(), ["get_field", "hide_fifth_fold"]))) {
            // line 15
            $context["endClass2"] = "endsection";
        } else {
            // line 17
            $context["endClass2"] = "";
            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);
        }
 
        do_action('timber_compile_done');
        return $output;
    }
 
    /**
     * Compile a string.
     *
     * @api
     * @example
     * ```php
     * $data = array(
     *     'username' => 'Jane Doe',
     * );
     *
     * $welcome = Timber::compile_string( 'Hi {{ username }}, I’m a string with a custom Twig variable', $data );
     * ```
     * @param string $string A string with Twig variables.
     * @param array  $data   Optional. An array of data to use in Twig template.
        $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 /doctor/nancy-barbar/
PATH /usr/local/bin:/usr/bin:/bin
DOCUMENT_ROOT /home/u160-zxz4kw94g8t7/www/snoasthmaandallergy.com/public_html
REDIRECT_STATUS 200
HTTPS on
UNIQUE_ID XwO0HdxDkWVoxsv9LFu-LgAAAAE
PHPHANDLER /usr/local/php73/bin/php
HTTP_HOST snoasthmaandallergy.com
HTTP_X_REAL_IP 3.235.74.77
HTTP_X_FORWARDED_PROTO https
HTTP_X_FORWARDED_FOR 3.235.74.77
HTTP_X_ACCEPT_ENCODING gzip
HTTP_CONNECTION close
HTTP_CF_IPCOUNTRY US
HTTP_CF_RAY 5aed1d580eddcf20-IAD
HTTP_CF_VISITOR {\"scheme\":\"https\"}
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_CF_REQUEST_ID 03c810ab090000cf205bac6200000001
HTTP_CF_CONNECTING_IP 3.235.74.77
HTTP_CDN_LOOP cloudflare
SERVER_NAME snoasthmaandallergy.com
SERVER_ADDR 127.0.0.1
SERVER_PORT 443
REMOTE_ADDR 3.235.74.77
SERVER_ADMIN webmaster
SCRIPT_FILENAME /home/u160-zxz4kw94g8t7/www/snoasthmaandallergy.com/public_html/index.php
REMOTE_PORT 49806
REDIRECT_URL /doctor/nancy-barbar/
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.0
REQUEST_METHOD GET
QUERY_STRING
SCRIPT_NAME /index.php
PHP_DEFAULT_SOCKET_TIMEOUT 20
PHP_MAX_EXECUTION_TIME 120
PHP_MAX_INPUT_TIME 120
PHP_MEMORY_LIMIT 768M
PHP_POST_MAX_SIZE 128M
PHP_UPLOAD_MAX_FILESIZE 128M
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1594078237.6471
REQUEST_TIME 1594078237
empty
0. Whoops\Handler\PrettyPageHandler