Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Warning: count(): Parameter must be an array or an object that implements Countable

Tags:

wordpress

I'm currently getting this Error:

Warning: count(): Parameter must be an array or an object that implements Countable in C:\xampp\htdocs\wordpress\wp-includes\theme.php on line 629

and I don't have an Idea how to fix it.

like image 694
Mxolisi Avatar asked Jul 11 '18 08:07

Mxolisi


2 Answers

If you are using WordPress make sure the_content is inside the loop. That was my issues.

<?php
        while ( have_posts() ) : the_post();
            the_content();
        endwhile; // End of the loop.
        ?>
like image 96
Dess Avatar answered Oct 29 '22 23:10

Dess


Duplicate of phpmyadmin - count(): Parameter must be an array or an object that implements Countable

Accepted answer from that page is given below.

Edit file /usr/share/phpmyadmin/libraries/sql.lib.php:

sudo nano /usr/share/phpmyadmin/libraries/sql.lib.php

Replace: count($analyzed_sql_results['select_expr'] == 1)

With: (count($analyzed_sql_results['select_expr']) == 1)

Restart the server

sudo service apache2 restart
like image 39
M.A.K. Ripon Avatar answered Oct 29 '22 21:10

M.A.K. Ripon