Array to string conversion error in /Twig/Environment.php when using Timber

1.7k Views Asked by At

When simply calling Timber::get_pagination(), I get this error:

Notice: Array to string conversion in /vendor/twig/twig/lib/Twig/Environment.php(462) : eval()'d code on line 63

Followed by an attempt to echo an array. I'm not actually echoing anything. Full block in index.php is

if (is_home() || is_archive()) {
    global $wp_query;
    if ($wp_query->max_num_pages > 1) {
        $context['pagination'] = Timber::get_pagination(['show_all' => true]);
    }
}

Any insight is much appreciated!

0

There are 0 best solutions below