Twig \ Error \ RuntimeError
An exception has been thrown during the rendering of a template ("filesize(): stat failed for /home/mcpehub/mcpehub.net/wp-content/uploads/2022/01/minecraft-0-1-2.apk").
Previous exceptions
  • filesize(): stat failed for /home/mcpehub/mcpehub.net/wp-content/uploads/2022/01/minecraft-0-1-2.apk (2)
Twig\Error\RuntimeError thrown with message "An exception has been thrown during the rendering of a template ("filesize(): stat failed for /home/mcpehub/mcpehub.net/wp-content/uploads/2022/01/minecraft-0-1-2.apk")." Stacktrace: #28 Twig\Error\RuntimeError in /home/mcpehub/mcpehub.net/wp-content/themes/ko_ocelot/views/partials/content-single.html.twig:155 #27 Whoops\Exception\ErrorException in /home/mcpehub/mcpehub.net/wp-content/themes/ko_ocelot/functions.php:59 #26 filesize in /home/mcpehub/mcpehub.net/wp-content/themes/ko_ocelot/functions.php:59 #25 get_file_size in /home/mcpehub/mcpehub.net/wp-content/cache/gantry5/ko_ocelot/twig/42/4221605d98847219d4ebbd3b806fea22483d63b45af7ea4efe69b2332f671648.php:630 #24 __TwigTemplate_652a4de884a194551a0cf111ecfbce520aeec6acc045fd54de0b20c33c656ec6:block_content in /home/mcpehub/mcpehub.net/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:214 #23 Twig\Template:displayBlock in /home/mcpehub/mcpehub.net/wp-content/cache/gantry5/ko_ocelot/twig/42/4221605d98847219d4ebbd3b806fea22483d63b45af7ea4efe69b2332f671648.php:165 #22 __TwigTemplate_652a4de884a194551a0cf111ecfbce520aeec6acc045fd54de0b20c33c656ec6:doDisplay in /home/mcpehub/mcpehub.net/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:453 #21 Twig\Template:displayWithErrorHandling in /home/mcpehub/mcpehub.net/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:420 #20 Twig\Template:display in /home/mcpehub/mcpehub.net/wp-content/cache/gantry5/ko_ocelot/twig/82/82cc1e8bf26ee8155f88f8230a6e623a35663e7390df4a8899306895e12dc08b.php:54 #19 __TwigTemplate_f48ff42e66f04ca13a1728e45dc1e7e57edf491a96d142789df9af187147946e:block_content in /home/mcpehub/mcpehub.net/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:214 #18 Twig\Template:displayBlock in /home/mcpehub/mcpehub.net/wp-content/cache/gantry5/ko_ocelot/twig/3d/3d1cdbf894dc416793f9f3262154e05bf61cb94d3a0a1e0148a0cd7720b8770b.php:55 #17 __TwigTemplate_21e220090368a6f3cbc28925ce0149e988572a8e26633347007f995cb08565da:doDisplay in /home/mcpehub/mcpehub.net/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:453 #16 Twig\Template:displayWithErrorHandling in /home/mcpehub/mcpehub.net/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:420 #15 Twig\Template:display in /home/mcpehub/mcpehub.net/wp-content/cache/gantry5/ko_ocelot/twig/1c/1c9969a6c9ea70bf0472ebeea2a11940f8638e772554db09be4f0ad96ebce373.php:36 #14 __TwigTemplate_97a1568c7ccf40037fe8dcf27c2317c82197987b73f8daa5e0298e21ce2c4a28:doDisplay in /home/mcpehub/mcpehub.net/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:453 #13 Twig\Template:displayWithErrorHandling in /home/mcpehub/mcpehub.net/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:420 #12 Twig\Template:display in /home/mcpehub/mcpehub.net/wp-content/cache/gantry5/ko_ocelot/twig/82/82cc1e8bf26ee8155f88f8230a6e623a35663e7390df4a8899306895e12dc08b.php:40 #11 __TwigTemplate_f48ff42e66f04ca13a1728e45dc1e7e57edf491a96d142789df9af187147946e:doDisplay in /home/mcpehub/mcpehub.net/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:453 #10 Twig\Template:displayWithErrorHandling in /home/mcpehub/mcpehub.net/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:420 #9 Twig\Template:display in /home/mcpehub/mcpehub.net/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:432 #8 Twig\Template:render in /home/mcpehub/mcpehub.net/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/TemplateWrapper.php:47 #7 Twig\TemplateWrapper:render in /home/mcpehub/mcpehub.net/wp-content/plugins/gantry5/vendor/timber/timber/lib/Loader.php:79 #6 Timber\Loader:render in /home/mcpehub/mcpehub.net/wp-content/plugins/gantry5/vendor/timber/timber/lib/Timber.php:334 #5 Timber\Timber:compile in /home/mcpehub/mcpehub.net/wp-content/plugins/gantry5/vendor/timber/timber/lib/Timber.php:383 #4 Timber\Timber:fetch in /home/mcpehub/mcpehub.net/wp-content/plugins/gantry5/vendor/timber/timber/lib/Timber.php:410 #3 Timber\Timber:render in /home/mcpehub/mcpehub.net/wp-content/themes/ko_ocelot/single.php:78 #2 include in /home/mcpehub/mcpehub.net/wp-includes/template-loader.php:132 #1 require_once in /home/mcpehub/mcpehub.net/wp-blog-header.php:19 #0 require in /home/mcpehub/mcpehub.net/index.php:17
Stack frames (29)
28
Twig\Error\RuntimeError
/home/mcpehub/mcpehub.net/wp-content/themes/ko_ocelot/views/partials/content-single.html.twig155
27
Whoops\Exception\ErrorException
/home/mcpehub/mcpehub.net/wp-content/themes/ko_ocelot/functions.php59
26
filesize
/home/mcpehub/mcpehub.net/wp-content/themes/ko_ocelot/functions.php59
25
get_file_size
/home/mcpehub/mcpehub.net/wp-content/cache/gantry5/ko_ocelot/twig/42/4221605d98847219d4ebbd3b806fea22483d63b45af7ea4efe69b2332f671648.php630
24
__TwigTemplate_652a4de884a194551a0cf111ecfbce520aeec6acc045fd54de0b20c33c656ec6 block_content
/compat/vendor/twig/twig/src/Template.php214
23
Twig\Template displayBlock
/home/mcpehub/mcpehub.net/wp-content/cache/gantry5/ko_ocelot/twig/42/4221605d98847219d4ebbd3b806fea22483d63b45af7ea4efe69b2332f671648.php165
22
__TwigTemplate_652a4de884a194551a0cf111ecfbce520aeec6acc045fd54de0b20c33c656ec6 doDisplay
/compat/vendor/twig/twig/src/Template.php453
21
Twig\Template displayWithErrorHandling
/compat/vendor/twig/twig/src/Template.php420
20
Twig\Template display
/home/mcpehub/mcpehub.net/wp-content/cache/gantry5/ko_ocelot/twig/82/82cc1e8bf26ee8155f88f8230a6e623a35663e7390df4a8899306895e12dc08b.php54
19
__TwigTemplate_f48ff42e66f04ca13a1728e45dc1e7e57edf491a96d142789df9af187147946e block_content
/compat/vendor/twig/twig/src/Template.php214
18
Twig\Template displayBlock
/home/mcpehub/mcpehub.net/wp-content/cache/gantry5/ko_ocelot/twig/3d/3d1cdbf894dc416793f9f3262154e05bf61cb94d3a0a1e0148a0cd7720b8770b.php55
17
__TwigTemplate_21e220090368a6f3cbc28925ce0149e988572a8e26633347007f995cb08565da doDisplay
/compat/vendor/twig/twig/src/Template.php453
16
Twig\Template displayWithErrorHandling
/compat/vendor/twig/twig/src/Template.php420
15
Twig\Template display
/home/mcpehub/mcpehub.net/wp-content/cache/gantry5/ko_ocelot/twig/1c/1c9969a6c9ea70bf0472ebeea2a11940f8638e772554db09be4f0ad96ebce373.php36
14
__TwigTemplate_97a1568c7ccf40037fe8dcf27c2317c82197987b73f8daa5e0298e21ce2c4a28 doDisplay
/compat/vendor/twig/twig/src/Template.php453
13
Twig\Template displayWithErrorHandling
/compat/vendor/twig/twig/src/Template.php420
12
Twig\Template display
/home/mcpehub/mcpehub.net/wp-content/cache/gantry5/ko_ocelot/twig/82/82cc1e8bf26ee8155f88f8230a6e623a35663e7390df4a8899306895e12dc08b.php40
11
__TwigTemplate_f48ff42e66f04ca13a1728e45dc1e7e57edf491a96d142789df9af187147946e doDisplay
/compat/vendor/twig/twig/src/Template.php453
10
Twig\Template displayWithErrorHandling
/compat/vendor/twig/twig/src/Template.php420
9
Twig\Template display
/compat/vendor/twig/twig/src/Template.php432
8
Twig\Template render
/compat/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/mcpehub/mcpehub.net/wp-content/themes/ko_ocelot/single.php78
2
include
/home/mcpehub/mcpehub.net/wp-includes/template-loader.php132
1
require_once
/home/mcpehub/mcpehub.net/wp-blog-header.php19
0
require
/home/mcpehub/mcpehub.net/index.php17
        </div>
        </div>
        </div>
        
        {# Begin download #}
            {% if downloads or alterdownloads %}
            <div class="box-outline nomarginright nomarginleft">
            <div class="g-content g-particle">
            <span id="app-download-anchor"></span>
            {% if post._files_title %}<h2 class="g-title">{{ post._files_title|raw }}</h2>{% endif %}
            <section id="app-download" class="app-download">
                {% for download in downloads %}
                    {% set onefile = wordpress.call('Timber::get_post', download) %}
                    <form action="" method="post" {% if googleappbutton == 'googleappbuttonshow' %}class="hidden-desktop"{% endif %}>
                        <input type="hidden" name="sourcepost" value="{{ post.id }}" >
                        <button class="button button-download" type="submit" name="app" value="{{ onefile.id }}">
                            <i class="fa fw fa-cloud-download"></i>
                            <span class="details-button">
                                <span class="f-txt">{{ gantry.config.get('content.single.lang.downloads')|raw }}</span>
                                <span {% if loop.index == '1' %}itemprop="fileSize"{% endif %} content="{{ get_file_size(onefile.id) }}" class="f-siz"><span class="f-ext">.{{ onefile.guid|split('.')|last }}</span> ({{ get_file_size(onefile.id) }})</span>
                            </span>
                            <span class="content-button">
                                <span class="f-tit">{{ onefile.post_title }}</span>
                                <span class="f-des">{% filter shortcodes %}{{ onefile.post_content }}{% endfilter %}</span>
                            </span>
                        </button>
                    </form>
                {% endfor %}
                {% for alterdownload in alterdownloads %}
                    <a href="{{ alterdownload.link }}" rel="nofollow"  class="button button-download {% if googleappbutton == 'googleappbuttonshow' %}hidden-desktop{% endif %}">
                        <i class="fa fw fa-cloud-download"></i>
                        <span class="details-button">
                            <span class="f-txt">{{ gantry.config.get('content.single.lang.downloads')|raw }}</span>
                            <span {% if loop.index == '1' and downloadsno %}itemprop="fileSize" content="{{ alterdownload.size }}"{% endif %} class="f-siz"><span class="f-ext">{{ alterdownload.ext }}</span> ({{ alterdownload.size }})</span>
                        </span>
                        <span class="content-button">
                            <span class="f-tit">{{ alterdownload.title }}</span>
                            <span class="f-des">{% filter shortcodes %}{{ alterdownload.desc }}{% endfilter %}</span>
                        </span>
                    </a>
    require $filepath;
}
 
show_admin_bar(false);
 
 
add_filter( 'template_include', 'download_page_template', 99 );
 
function download_page_template( $template ) {
    if( isset($_POST['app']) or isset($_GET['app']) ){
        if ( $new_template = locate_template( array( 'download.php' ) ) ) {
            $template = $new_template ;
        }
    }
    return $template;
}
 
//Размер файла
function get_file_size($file) {
    $bytes = filesize(get_attached_file($file));
    $s = array('b', 'Kb', 'Mb', 'Gb');
    $e = floor(log($bytes)/log(1024));
    return sprintf('%.2f '.$s[$e], ($bytes/pow(1024, floor($e))));
}
 
add_filter( 'timber/twig', 'add_to_file_size_twig' );
function add_to_file_size_twig( $twig ) {
    $func = new Timber\Twig_Function('get_file_size', 'get_file_size');
    $twig->addFunction($func);
    return $twig;
}
 
 
 
function remove_styles () {
    wp_deregister_style('search-filter-plugin-styles');
    wp_deregister_script( 'search-filter-plugin-select2' );
    wp_deregister_script( 'wp-embed' );
    if( !is_category() ) {
        wp_deregister_script( 'search-filter-plugin-build' ); 
Exception message: filesize(): stat failed for /home/mcpehub/mcpehub.net/wp-content/uploads/2022/01/minecraft-0-1-2.apk
    require $filepath;
}
 
show_admin_bar(false);
 
 
add_filter( 'template_include', 'download_page_template', 99 );
 
function download_page_template( $template ) {
    if( isset($_POST['app']) or isset($_GET['app']) ){
        if ( $new_template = locate_template( array( 'download.php' ) ) ) {
            $template = $new_template ;
        }
    }
    return $template;
}
 
//Размер файла
function get_file_size($file) {
    $bytes = filesize(get_attached_file($file));
    $s = array('b', 'Kb', 'Mb', 'Gb');
    $e = floor(log($bytes)/log(1024));
    return sprintf('%.2f '.$s[$e], ($bytes/pow(1024, floor($e))));
}
 
add_filter( 'timber/twig', 'add_to_file_size_twig' );
function add_to_file_size_twig( $twig ) {
    $func = new Timber\Twig_Function('get_file_size', 'get_file_size');
    $twig->addFunction($func);
    return $twig;
}
 
 
 
function remove_styles () {
    wp_deregister_style('search-filter-plugin-styles');
    wp_deregister_script( 'search-filter-plugin-select2' );
    wp_deregister_script( 'wp-embed' );
    if( !is_category() ) {
        wp_deregister_script( 'search-filter-plugin-build' ); 
                // line 150
                echo $this->getAttribute(($context["post"] ?? null), "id", []);
                echo "\" >
                        <button class=\"button button-download\" type=\"submit\" name=\"app\" value=\"";
                // line 151
                echo $this->getAttribute(($context["onefile"] ?? null), "id", []);
                echo "\">
                            <i class=\"fa fw fa-cloud-download\"></i>
                            <span class=\"details-button\">
                                <span class=\"f-txt\">";
                // line 154
                echo $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "config", []), "get", [0 => "content.single.lang.downloads"], "method");
                echo "</span>
                                <span ";
                // line 155
                if (($this->getAttribute($context["loop"], "index", []) == "1")) {
                    echo "itemprop=\"fileSize\"";
                }
                echo " content=\"";
                echo get_file_size($this->getAttribute(($context["onefile"] ?? null), "id", []));
                echo "\" class=\"f-siz\"><span class=\"f-ext\">.";
                echo twig_last($this->env, twig_split_filter($this->env, $this->getAttribute(($context["onefile"] ?? null), "guid", []), "."));
                echo "</span> (";
                echo get_file_size($this->getAttribute(($context["onefile"] ?? null), "id", []));
                echo ")</span>
                            </span>
                            <span class=\"content-button\">
                                <span class=\"f-tit\">";
                // line 158
                echo $this->getAttribute(($context["onefile"] ?? null), "post_title", []);
                echo "</span>
                                <span class=\"f-des\">";
                // line 159
                echo do_shortcode(                $this->renderBlock("__internal_469a4aeecfd707763f99aeb4f8c9ae647eab96982867ceb5b4b5a9564070b20c", $context, $blocks));
                echo "</span>
                            </span>
                        </button>
                    </form>
                ";
                ++$context['loop']['index0'];
 
        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);
        foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
            // line 35
            echo "        ";
            if (twig_in_filter($this->getAttribute($context["category"], "id", []), [0 => "36", 1 => "40", 2 => "41", 3 => "42", 4 => "43", 5 => "44", 6 => "45", 7 => "51", 8 => "53", 9 => "54", 10 => "55", 11 => "56", 12 => "57", 13 => "58", 14 => "60", 15 => "64", 16 => "66", 17 => "69", 18 => "70", 19 => "72", 20 => "73", 21 => "75", 22 => "78", 23 => "79", 24 => "81", 25 => "82", 26 => "87", 27 => "88", 28 => "89", 29 => "93", 30 => "94", 31 => "96", 32 => "97", 33 => "98", 34 => "99"])) {
                echo "   
            ";
                // line 36
                $context["googleappbutton"] = "googleappbuttonshow";
                // line 37
                echo "        ";
            }
            // line 38
            echo "    ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['category'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 39
        echo "    ";
        $this->displayBlock('content', $context, $blocks);
        // line 394
        echo "
                
<div itemscope itemprop='offers' itemtype='http://schema.org/Offer'><meta itemprop='price' content='0.00' /><meta itemprop='priceCurrency' content='RUB' /></div>
<meta itemprop=\"isAccessibleForFree\" content=\"true\" />
<meta itemprop=\"genre\" content=\"Песочница\" />
<meta itemprop=\"memoryRequirements\" content=\"256Mb\" />
<meta itemprop=\"processorRequirements\" content=\"Processor over 1GHz\" />
<meta itemprop=\"storageRequirements\" content=\"1Gb\" />
<meta itemprop=\"thumbnailUrl\" content=\"";
        // line 402
        echo Timber\ImageHelper::resize($this->getAttribute($this->getAttribute(($context["post"] ?? null), "thumbnail", []), "src", []), 1200, 800);
        echo "\" />
<meta itemprop=\"contentRating\" content=\"7+\" />
<meta itemprop=\"datePublished\" content=\"";
        // line 404
        echo $this->getAttribute(($context["post"] ?? null), "date", [0 => "Y-m-d"], "method");
        echo "\"/>
<meta itemprop=\"dateModified\" content=\"";
        // line 405
            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(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"]) {
            // line 15
            echo "    ";
            if (($this->getAttribute($context["segment"], "type", []) == "offcanvas")) {
                // line 16
                $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;
            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
     */
            )
        )
    );
    $similar_query = new WP_Query( $args );
    if( $similar_query->have_posts() ){
        while( $similar_query->have_posts() ) : $similar_query->the_post();
            $similar[$i] = $similar_query->post->ID;
            $i++;
        endwhile;
    }
    wp_reset_postdata();
} else {
    foreach ( carbon_get_post_meta( $post->ID, 'similar' ) as $post_item ) {
        $similar[$i] = $post_item['id'];
        $i++;
    }
}
$context['similar'] = $similar;
 
Timber::render(['single-' . $post->ID . '.html.twig', 'single-' . $post->post_type . '.html.twig', 'single.html.twig'], $context);
 
     */
    $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;
}
 
<?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 nginx/1.24.0
REQUEST_URI /download/0-1/minecraft-0-1-2-android/
USER mcpehub
HOME /home/mcpehub
HTTP_REFERER https://mcpehub.net/download/0-1/minecraft-0-1-2-android
HTTP_ACCEPT_ENCODING gzip, br, zstd, deflate
HTTP_USER_AGENT Mozilla/99999.9 AppleWebKit/9999999.99 (KHTML, like Gecko) Chrome/999999.0.9999.99 Safari/9999999.99 seraph-accel-Agent/2.22.16
HTTP_ACCEPT */*
HTTP_HOST mcpehub.net
REDIRECT_STATUS 200
SERVER_NAME mcpehub.net
SERVER_PORT 443
SERVER_ADDR 45.92.177.34
REMOTE_USER
REMOTE_PORT 24971
REMOTE_ADDR 216.73.216.87
GATEWAY_INTERFACE CGI/1.1
HTTPS on
REQUEST_SCHEME https
SERVER_PROTOCOL HTTP/2.0
DOCUMENT_ROOT /home/mcpehub/mcpehub.net
DOCUMENT_URI /index.php
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING
SCRIPT_FILENAME /home/mcpehub/mcpehub.net/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1774166962.2993
REQUEST_TIME 1774166962
SERAPH_ACCEL_ORIG_USER_AGENT Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
empty
0. Whoops\Handler\PrettyPageHandler