Whoops \ Exception \ ErrorException (E_WARNING)
count(): Parameter must be an array or an object that implements Countable Whoops\Exception\ErrorException thrown with message "count(): Parameter must be an array or an object that implements Countable" Stacktrace: #4 Whoops\Exception\ErrorException in /var/www/ferma/wp-content/themes/tutmee/category.php:71 #3 Whoops\Run:handleError in /var/www/ferma/wp-content/themes/tutmee/category.php:71 #2 include in /var/www/ferma/wp-includes/template-loader.php:106 #1 require_once in /var/www/ferma/wp-blog-header.php:19 #0 require in /var/www/ferma/index.php:17
Stack frames (5)
4
Whoops
\
Exception
\
ErrorException
/
category.php
71
3
Whoops
\
Run
handleError
/
category.php
71
2
include
/
var
/
www
/
ferma
/
wp-includes
/
template-loader.php
106
1
require_once
/
var
/
www
/
ferma
/
wp-blog-header.php
19
0
require
/
var
/
www
/
ferma
/
index.php
17
/
var
/
www
/
ferma
/
wp-content
/
themes
/
tutmee
/
category.php
    $data['all_cat'][$key]->link = get_category_link($thisCat->term_id);
 
}
 
$data[ 'pagination' ] = paginate_links([
    'type'               => 'array',
    'show_all'           => false,
    'end_size'           => 1,
    'mid_size'           => 1,
    'prev_next'          => true,
    // выводить ли боковые ссылки "предыдущая/следующая страница".
    'prev_text'          => 'Предыдущая',
    'next_text'          => "Следующая",
    'add_args'           => false,
    // Массив аргументов (переменных запроса), которые нужно добавить к ссылкам.
    'add_fragment'       => '',
    // Текст который добавиться ко всем ссылкам.
    'screen_reader_text' => false,
]);
if ( count($data[ 'pagination' ]) ) {
    foreach ( $data[ 'pagination' ] as &$link ) {
        $link = str_replace([
            'next',
            'prev',
            'page-numbers',
            'current',
        ], [
            'pagination__link_next',
            'pagination__link_prev',
            'pagination__link',
            '_active',
        ], $link);
    }
    $data[ 'pagination' ] = implode($data[ 'pagination' ]);
}
 
//echo '<pre>';
//print_r( $data['all_cat'] );
//echo '</pre>';
 
/
var
/
www
/
ferma
/
wp-content
/
themes
/
tutmee
/
category.php
    $data['all_cat'][$key]->link = get_category_link($thisCat->term_id);
 
}
 
$data[ 'pagination' ] = paginate_links([
    'type'               => 'array',
    'show_all'           => false,
    'end_size'           => 1,
    'mid_size'           => 1,
    'prev_next'          => true,
    // выводить ли боковые ссылки "предыдущая/следующая страница".
    'prev_text'          => 'Предыдущая',
    'next_text'          => "Следующая",
    'add_args'           => false,
    // Массив аргументов (переменных запроса), которые нужно добавить к ссылкам.
    'add_fragment'       => '',
    // Текст который добавиться ко всем ссылкам.
    'screen_reader_text' => false,
]);
if ( count($data[ 'pagination' ]) ) {
    foreach ( $data[ 'pagination' ] as &$link ) {
        $link = str_replace([
            'next',
            'prev',
            'page-numbers',
            'current',
        ], [
            'pagination__link_next',
            'pagination__link_prev',
            'pagination__link',
            '_active',
        ], $link);
    }
    $data[ 'pagination' ] = implode($data[ 'pagination' ]);
}
 
//echo '<pre>';
//print_r( $data['all_cat'] );
//echo '</pre>';
 
/
var
/
www
/
ferma
/
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;
}
 
/
var
/
www
/
ferma
/
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';
 
}
 
/
var
/
www
/
ferma
/
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';
 

Environment & details:

Key Value
cat 91
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE nginx/1.2.1
REQUEST_URI /?cat=91
USER www-data
HOME /home/www-data
HTTP_CONNECTION Keep-Alive
HTTP_HOST igene-ferma.com
HTTP_ACCEPT_ENCODING br,gzip
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/)
REDIRECT_STATUS 200
HTTPS
SERVER_NAME ferma.i-gene.ru
SERVER_PORT 80
SERVER_ADDR 192.168.0.4
REMOTE_PORT 54184
REMOTE_ADDR 3.239.236.140
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /var/www/ferma/
DOCUMENT_URI /index.php
SCRIPT_NAME /index.php
SCRIPT_FILENAME /var/www/ferma/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING cat=91
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1611192159.9174
REQUEST_TIME 1611192159
argv Array ( [0] => cat=91 )
argc 1
Key Value
USER www-data
HOME /home/www-data
HTTP_CONNECTION Keep-Alive
HTTP_HOST igene-ferma.com
HTTP_ACCEPT_ENCODING br,gzip
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/)
REDIRECT_STATUS 200
HTTPS
SERVER_NAME ferma.i-gene.ru
SERVER_PORT 80
SERVER_ADDR 192.168.0.4
REMOTE_PORT 54184
REMOTE_ADDR 3.239.236.140
SERVER_SOFTWARE nginx/1.2.1
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /var/www/ferma/
DOCUMENT_URI /index.php
REQUEST_URI /?cat=91
SCRIPT_NAME /index.php
SCRIPT_FILENAME /var/www/ferma/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING cat=91
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1611192159.9174
REQUEST_TIME 1611192159
argv Array ( [0] => cat=91 )
argc 1
0. Whoops\Handler\PrettyPageHandler