Twig \ Error \ RuntimeError
An exception has been thrown during the rendering of a template ("strip_tags() expects parameter 1 to be string, array given").
Previous exceptions
  • strip_tags() expects parameter 1 to be string, array given (2)
Twig\Error\RuntimeError thrown with message "An exception has been thrown during the rendering of a template ("strip_tags() expects parameter 1 to be string, array given")." Stacktrace: #20 Twig\Error\RuntimeError in /home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/themes/ctasc-2017/views/archives/archive-expert_answers.twig.html:45 #19 Whoops\Exception\ErrorException in /home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/lib/TextHelper.php:48 #18 strip_tags in /home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/lib/TextHelper.php:48 #17 Timber\TextHelper:trim_words in /home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/lib/Twig.php:219 #16 Timber\Twig:Timber\{closure} in /home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/vendor/twig/twig/src/Environment.php:497 #15 __TwigTemplate_d21d6469aab32cea74698584b14558b71959676d4dde44ed6a99e6cf1d77c0f0:doDisplay in /home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/vendor/twig/twig/src/Template.php:453 #14 Twig\Template:displayWithErrorHandling in /home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/vendor/twig/twig/src/Template.php:420 #13 Twig\Template:display in /home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/vendor/twig/twig/src/Template.php:432 #12 Twig\Template:render in /home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/vendor/twig/twig/src/TemplateWrapper.php:47 #11 Twig\TemplateWrapper:render in /home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/lib/Loader.php:79 #10 Timber\Loader:render in /home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/lib/Timber.php:334 #9 Timber\Timber:compile in /home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/lib/Timber.php:383 #8 Timber\Timber:fetch in /home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/lib/Timber.php:410 #7 Timber\Timber:render in /home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/themes/ctasc-2017/archive-common.php:199 #6 include_once in /home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/themes/ctasc-2017/archive-expert_answers.php:14 #5 require_once in /home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-includes/template.php:730 #4 load_template in /home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-includes/template.php:676 #3 locate_template in /home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/themes/ctasc-2017/category.php:14 #2 include in /home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-includes/template-loader.php:106 #1 require_once in /home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-blog-header.php:19 #0 require in /home/743387.cloudwaysapps.com/savqkkqzqr/public_html/index.php:17
Stack frames (21)
20
Twig\Error\RuntimeError
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/themes/ctasc-2017/views/archives/archive-expert_answers.twig.html45
19
Whoops\Exception\ErrorException
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/lib/TextHelper.php48
18
strip_tags
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/lib/TextHelper.php48
17
Timber\TextHelper trim_words
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/lib/Twig.php219
16
Timber\Twig Timber\{closure}
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/vendor/twig/twig/src/Environment.php497
15
__TwigTemplate_d21d6469aab32cea74698584b14558b71959676d4dde44ed6a99e6cf1d77c0f0 doDisplay
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/vendor/twig/twig/src/Template.php453
14
Twig\Template displayWithErrorHandling
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/vendor/twig/twig/src/Template.php420
13
Twig\Template display
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/vendor/twig/twig/src/Template.php432
12
Twig\Template render
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/vendor/twig/twig/src/TemplateWrapper.php47
11
Twig\TemplateWrapper render
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/lib/Loader.php79
10
Timber\Loader render
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/lib/Timber.php334
9
Timber\Timber compile
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/lib/Timber.php383
8
Timber\Timber fetch
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/lib/Timber.php410
7
Timber\Timber render
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/themes/ctasc-2017/archive-common.php199
6
include_once
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/themes/ctasc-2017/archive-expert_answers.php14
5
require_once
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-includes/template.php730
4
load_template
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-includes/template.php676
3
locate_template
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/themes/ctasc-2017/category.php14
2
include
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-includes/template-loader.php106
1
require_once
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-blog-header.php19
0
require
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/index.php17
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/themes/ctasc-2017/views/archives/archive-expert_answers.twig.html
                                {% for category in post.terms('category') %}
                                    <a href="{{ category.link }}" style="padding-right:5px;color: gray;" 
                                                class="ctasc-category-link" title="{{ category.title }}">{{ category.title }}</a>
                                {% endfor %}
                                
                            {% endif %} 
                            </div>        
 
                            <div class="box-text text-left">
                                <h3 class="post-title" style="margin-bottom:10px;"><a href="{{post.link}}">{{post.post_title}}</a></h3>
 
                                <p class="byline" style="margin-bottom:10px;text-transform: uppercase;font-size: 70%;color: gray;">
                                    <img itemprop="image" alt="Donato Pompo" src="{{post.custom.gravatar}}" 
                                                class="avatar avatar-25 photo" height="25" width="25" style="margin-right:15px;border-radius: 50%;">
                                    <a href="{{post.author.link}}">{{post.author.name}}</a> · {{ post.date | date('M jS, Y') }}
                                </p>    
 
                                <div class="box-text-inner blog-post-inner" >                    
                                    
                                    <p>{{post.answer|truncate(35)}}</p>
 
                                    [button size="small" style="primary" text="Read More" link="{{post.link}}" target=""]
 
                                </div>
                            </div>
                            
                                                    
                            <!-- include sharemore -->
                        
                        </div>
                    </a>
                </div>
            </div>
 
            {% endfor %}
        
        </div>
 
        <div style="clear:both;"></div>
    
Arguments
  1. "An exception has been thrown during the rendering of a template ("strip_tags() expects parameter 1 to be string, array given")."
    
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/lib/TextHelper.php
 
    /**
     *
     *
     * @param string  $text
     * @param int     $num_words
     * @param string|null|false  $more text to appear in "Read more...". Null to use default, false to hide
     * @param string  $allowed_tags
     * @return string
     */
    public static function trim_words( $text, $num_words = 55, $more = null, $allowed_tags = 'p a span b i br blockquote' ) {
        if ( null === $more ) {
            $more = __('&hellip;');
        }
        $original_text = $text;
       
        $allowed_tags_array = explode(' ', apply_filters('timber/trim_words/allowed_tags', $allowed_tags));
        $allowed_tags_array = array_filter($allowed_tags_array, function($value) { return $value !== ''; });
        $allowed_tag_string = '<'.implode('><', $allowed_tags_array).'>';
        $text = strip_tags($text, $allowed_tag_string);
        /* translators: If your word count is based on single characters (East Asian characters), enter 'characters'. Otherwise, enter 'words'. Do not translate into your own language. */
        if ( 'characters' == _x('words', 'word count: words or characters?') && preg_match('/^utf\-?8$/i', get_option('blog_charset')) ) {
            $text = trim(preg_replace("/[\n\r\t ]+/", ' ', $text), ' ');
            preg_match_all('/./u', $text, $words_array);
            $words_array = array_slice($words_array[0], 0, $num_words + 1);
            $sep = '';
        } else {
            $words_array = preg_split("/[\n\r\t ]+/", $text, $num_words + 1, PREG_SPLIT_NO_EMPTY);
            $sep = ' ';
        }
        if ( count($words_array) > $num_words ) {
            array_pop($words_array);
            $text = implode($sep, $words_array);
            $text = $text.$more;
        } else {
            $text = implode($sep, $words_array);
        }
        $text = self::close_tags($text);
        return apply_filters('wp_trim_words', $text, $num_words, $more, $original_text);
    }
Arguments
  1. "strip_tags() expects parameter 1 to be string, array given"
    
Exception message: strip_tags() expects parameter 1 to be string, array given
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/lib/TextHelper.php
 
    /**
     *
     *
     * @param string  $text
     * @param int     $num_words
     * @param string|null|false  $more text to appear in "Read more...". Null to use default, false to hide
     * @param string  $allowed_tags
     * @return string
     */
    public static function trim_words( $text, $num_words = 55, $more = null, $allowed_tags = 'p a span b i br blockquote' ) {
        if ( null === $more ) {
            $more = __('&hellip;');
        }
        $original_text = $text;
       
        $allowed_tags_array = explode(' ', apply_filters('timber/trim_words/allowed_tags', $allowed_tags));
        $allowed_tags_array = array_filter($allowed_tags_array, function($value) { return $value !== ''; });
        $allowed_tag_string = '<'.implode('><', $allowed_tags_array).'>';
        $text = strip_tags($text, $allowed_tag_string);
        /* translators: If your word count is based on single characters (East Asian characters), enter 'characters'. Otherwise, enter 'words'. Do not translate into your own language. */
        if ( 'characters' == _x('words', 'word count: words or characters?') && preg_match('/^utf\-?8$/i', get_option('blog_charset')) ) {
            $text = trim(preg_replace("/[\n\r\t ]+/", ' ', $text), ' ');
            preg_match_all('/./u', $text, $words_array);
            $words_array = array_slice($words_array[0], 0, $num_words + 1);
            $sep = '';
        } else {
            $words_array = preg_split("/[\n\r\t ]+/", $text, $num_words + 1, PREG_SPLIT_NO_EMPTY);
            $sep = ' ';
        }
        if ( count($words_array) > $num_words ) {
            array_pop($words_array);
            $text = implode($sep, $words_array);
            $text = $text.$more;
        } else {
            $text = implode($sep, $words_array);
        }
        $text = self::close_tags($text);
        return apply_filters('wp_trim_words', $text, $num_words, $more, $original_text);
    }
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/lib/Twig.php
        $twig->addFilter(new Twig_Filter('list', array($this, 'add_list_separators')));
 
        $twig->addFilter(new Twig_Filter('pluck', array('Timber\Helper', 'pluck')));
 
        /**
         * @deprecated since 1.13 (to be removed in 2.0). Use Twig's native filter filter instead
         * @todo remove this in 2.x so that filter merely passes to Twig's filter without any modification
         * @ticket #1594 #2120
         */
        $twig->addFilter(new Twig_Filter('filter', array('Timber\Helper', 'filter_array')));
        $twig->addFilter(new Twig_Filter('wp_list_filter', array('Timber\Helper', 'wp_list_filter')));
 
        $twig->addFilter(new Twig_Filter('relative', function( $link ) {
                    return URLHelper::get_rel_url($link, true);
                } ));
 
        $twig->addFilter(new Twig_Filter('date', array($this, 'intl_date')));
 
        $twig->addFilter(new Twig_Filter('truncate', function( $text, $len ) {
                    return TextHelper::trim_words($text, $len);
                } ));
 
        /* actions and filters */
        $twig->addFilter(new Twig_Filter('apply_filters', function() {
                    $args = func_get_args();
                    $tag = current(array_splice($args, 1, 1));
 
                    return apply_filters_ref_array($tag, $args);
                } ));
 
        return $twig;
    }
 
    /**
     * Adds escapers to Twig.
     *
     * @param \Twig\Environment $twig The Twig Environment.
     * @return \Twig\Environment
     */
    public function add_timber_escapers( $twig ) {
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/vendor/twig/twig/src/Environment.php
                } else {
                    $source = $loader->getSourceContext($name);
                }
 
                $content = $this->compileSource($source);
 
                if ($this->bcWriteCacheFile) {
                    $this->writeCacheFile($key, $content);
                } else {
                    $this->cache->write($key, $content);
                    $this->cache->load($key);
                }
 
                if (!class_exists($mainCls, false)) {
                    /* Last line of defense if either $this->bcWriteCacheFile was used,
                     * $this->cache is implemented as a no-op or we have a race condition
                     * where the cache was cleared between the above calls to write to and load from
                     * the cache.
                     */
                    eval('?>'.$content);
                }
            }
 
            if (!class_exists($cls, false)) {
                throw new RuntimeError(sprintf('Failed to load Twig template "%s", index "%s": cache might be corrupted.', $name, $index), -1, $source);
            }
        }
 
        if (!$this->runtimeInitialized) {
            $this->initRuntime();
        }
 
        return $this->loadedTemplates[$cls] = new $cls($this);
    }
 
    /**
     * Creates a template from source.
     *
     * This method should not be used as a generic way to load templates.
     *
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/vendor/twig/twig/src/Template.php
            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;
        }
    }
 
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/vendor/twig/twig/src/Template.php
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        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) {
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/vendor/twig/twig/src/Template.php
    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 {
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/vendor/twig/twig/src/TemplateWrapper.php
     * @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
     *
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/lib/Loader.php
 
        $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.
     */
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/lib/Timber.php
        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',
     * );
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/lib/Timber.php
        $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
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/plugins/timber-library/lib/Timber.php
     * Passes data to a Twig file and echoes the output.
     *
     * @api
     * @example
     * ```php
     * $context = Timber::context();
     *
     * Timber::render( 'index.twig', $context );
     * ```
     * @param array|string $filenames  Name 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
     */
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/themes/ctasc-2017/archive-common.php
 
 
    // Pagination
    ob_start();
    flatsome_posts_pagination();
    $context['pagination'] = ob_get_contents();
    ob_end_clean();    
 
 
    if ( file_exists($tpath) ) {
    
        $context['tpath'] = $tpath;    
 
        // Debugging data
        ob_start();
        d( $context );
        $context['debug'] = ob_end_clean();
 
        ob_start();
        Timber::render( $tpath, $context );
        $out = ob_get_contents();
        ob_end_clean();    
        print do_shortcode( $out );
            
    } else {
        $context['missing_page'] = $tpath;
        ob_start();
        Timber::render_string( __fallback_404(), $context );
        $out = ob_get_contents();
        ob_end_clean();    
        print do_shortcode( $out );    
    }
        
    // ------
 
    // Flatsome likes this.
    do_action('flatsome_after_blog');
 
    // Standard WordPress footer
    get_footer();
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/themes/ctasc-2017/archive-expert_answers.php
<?php
/**
 * The STARTER Template for displaying all single posts - modified for flatsome
 *
 * Methods for TimberHelper can be found in the /lib sub-directory
 *
 * @package  WordPress
 * @subpackage  Timber
 * @since    Timber 0.1
 */
 
     // Let the common single handle this.
    $tpath = __DIR__ . '/archive-common.php';
    include_once( $tpath );
 
 
?>
Arguments
  1. "/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/themes/ctasc-2017/archive-common.php"
    
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-includes/template.php
 
    if ( is_array( $wp_query->query_vars ) ) {
        /*
         * This use of extract() cannot be removed. There are many possible ways that
         * templates could depend on variables that it creates existing, and no way to
         * detect and deprecate it.
         *
         * Passing the EXTR_SKIP flag is the safest option, ensuring globals and
         * function variables cannot be overwritten.
         */
        // phpcs:ignore WordPress.PHP.DontExtract.extract_extract
        extract( $wp_query->query_vars, EXTR_SKIP );
    }
 
    if ( isset( $s ) ) {
        $s = esc_attr( $s );
    }
 
    if ( $require_once ) {
        require_once $_template_file;
    } else {
        require $_template_file;
    }
}
 
Arguments
  1. "/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/themes/ctasc-2017/archive-expert_answers.php"
    
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-includes/template.php
function locate_template( $template_names, $load = false, $require_once = true, $args = array() ) {
    $located = '';
    foreach ( (array) $template_names as $template_name ) {
        if ( ! $template_name ) {
            continue;
        }
        if ( file_exists( STYLESHEETPATH . '/' . $template_name ) ) {
            $located = STYLESHEETPATH . '/' . $template_name;
            break;
        } elseif ( file_exists( TEMPLATEPATH . '/' . $template_name ) ) {
            $located = TEMPLATEPATH . '/' . $template_name;
            break;
        } elseif ( file_exists( ABSPATH . WPINC . '/theme-compat/' . $template_name ) ) {
            $located = ABSPATH . WPINC . '/theme-compat/' . $template_name;
            break;
        }
    }
 
    if ( $load && '' !== $located ) {
        load_template( $located, $require_once, $args );
    }
 
    return $located;
}
 
/**
 * Require the template file with WordPress environment.
 *
 * The globals are set up for the template file to ensure that the WordPress
 * environment is available from within the function. The query variables are
 * also available.
 *
 * @since 1.5.0
 * @since 5.5.0 The `$args` parameter was added.
 *
 * @global array      $posts
 * @global WP_Post    $post          Global post object.
 * @global bool       $wp_did_header
 * @global WP_Query   $wp_query      WordPress Query object.
 * @global WP_Rewrite $wp_rewrite    WordPress rewrite component.
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/themes/ctasc-2017/category.php
<?php 
 
    // Child of problem types goes to expert answers
    // $cat_ID = get_query_var('cat'); 
    // $categories = get_the_category();
//    print_r($_SERVER['REQUEST_URI']);
    // $categ = get_category_by_path($_SERVER['REQUEST_URI'], true, ARRAY_A);
    
    global $wp_the_query;
    $cat_ID = $wp_the_query->query_vars['cat'];
    
    if (cat_is_ancestor_of(72, $cat_ID ) or is_category(72)) {
    
        locate_template( 'archive-expert_answers.php', true, true );
 
    // Child of resources goes to directory listings
    } else if ( cat_is_ancestor_of( 73, $cat_ID ) || is_category( 73 ) ) {
        
        locate_template( 'archive-directory_listings.php', true, true );
        
    // Child of resources goes to directory listings
    } else if ( cat_is_ancestor_of( 117, $cat_ID ) || is_category( 117 ) ) {
        
        locate_template( 'archive-case_studies.php', true, true );
        
    } else {
 
        locate_template( 'archive-posts.php', true, true);
 
//        locate_template( 'index.php', true, true );
        
 
 
    }  // Endif from non-selector above
 
    // wp_die('TEST template: ' . $template . '.');
 
 
 ?>
 
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-includes/template-loader.php
            }
 
            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;
}
 
Arguments
  1. "/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-content/themes/ctasc-2017/category.php"
    
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-blog-header.php
<?php
/**
 * Loads the WordPress environment and template.
 *
 * @package WordPress
 */
 
if ( ! isset( $wp_did_header ) ) {
 
    $wp_did_header = true;
 
    // Load the WordPress library.
    require_once __DIR__ . '/wp-load.php';
 
    // Set up the WordPress query.
    wp();
 
    // Load the theme template.
    require_once ABSPATH . WPINC . '/template-loader.php';
 
}
 
Arguments
  1. "/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-includes/template-loader.php"
    
/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/index.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';
 
Arguments
  1. "/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/wp-blog-header.php"
    

Environment & details:

empty
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE
"Apache/2.4.57 (Debian)"
REQUEST_URI
"/category/expert-answers/ceramic-and-porcelain-tile/page/40/"
WP_REDIS_DISABLED
"0"
USER
"savqkkqzqr"
HOME
"/home/743387.cloudwaysapps.com/savqkkqzqr"
SCRIPT_NAME
"/index.php"
QUERY_STRING
""
REQUEST_METHOD
"GET"
SERVER_PROTOCOL
"HTTP/1.1"
GATEWAY_INTERFACE
"CGI/1.1"
REDIRECT_URL
"/category/expert-answers/ceramic-and-porcelain-tile/page/40/"
REMOTE_PORT
"28252"
SCRIPT_FILENAME
"/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/index.php"
SERVER_ADMIN
"[no address given]"
CONTEXT_DOCUMENT_ROOT
"/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/"
CONTEXT_PREFIX
""
REQUEST_SCHEME
"http"
DOCUMENT_ROOT
"/home/743387.cloudwaysapps.com/savqkkqzqr/public_html/"
REMOTE_ADDR
"127.0.0.1"
SERVER_PORT
"80"
SERVER_ADDR
"127.0.0.1"
SERVER_NAME
"ctasc.com"
SERVER_SIGNATURE
"<address>Apache/2.4.57 (Debian) Server at ctasc.com Port 80</address>\n"
PATH
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
HTTP_X_VARNISH
"19739830"
HTTP_HOST
"ctasc.com"
HTTP_X_FORWARDED_FOR
"18.206.194.21"
HTTP_CF_IPCOUNTRY
"US"
HTTP_CF_CONNECTING_IP
"18.206.194.21"
HTTP_CDN_LOOP
"cloudflare"
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/)"
HTTP_CF_VISITOR
"{\"scheme\":\"https\"}"
HTTP_CF_RAY
"80d493864fc53997-IAD"
HTTP_ACCEPT_ENCODING
"gzip"
HTTP_X_VERSION
"611"
HTTP_X_APP_USER
"savqkkqzqr"
HTTP_X_APPLICATION
"wordpress"
HTTP_X_FORWARDED_HOST
"ctasc.com"
HTTP_X_FORWARDED_PROTO
"https"
HTTP_X_CLIENT_REAL_IP
"18.206.194.21"
HTTP_X_REAL_IP
"18.206.194.21"
BREEZE_BROWSER_CACHE_ON
"1"
BREEZE_GZIP_ON
"1"
SCRIPT_URI
"http://ctasc.com/category/expert-answers/ceramic-and-porcelain-tile/page/40/"
SCRIPT_URL
"/category/expert-answers/ceramic-and-porcelain-tile/page/40/"
HTTP_AUTHORIZATION
""
HTTPS
"on"
cw_allowed_ip
"1"
REDIRECT_STATUS
"200"
REDIRECT_BREEZE_BROWSER_CACHE_ON
"1"
REDIRECT_BREEZE_GZIP_ON
"1"
REDIRECT_SCRIPT_URI
"http://ctasc.com/category/expert-answers/ceramic-and-porcelain-tile/page/40/"
REDIRECT_SCRIPT_URL
"/category/expert-answers/ceramic-and-porcelain-tile/page/40/"
REDIRECT_HTTP_AUTHORIZATION
""
REDIRECT_HTTPS
"on"
REDIRECT_cw_allowed_ip
"1"
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1695826407.5406
REQUEST_TIME
1695826407
empty
0. Whoops\Handler\PrettyPageHandler