5

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.

Peyman Mohamadpour
  • 17,954
  • 24
  • 89
  • 100
Mxolisi
  • 63
  • 1
  • 1
  • 7

3 Answers3

6

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.
        ?>
Dess
  • 101
  • 1
  • 5
2

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
M.A.K. Ripon
  • 2,070
  • 3
  • 29
  • 47
0
if($result->num_rows){
        $row = $result->fetch_array();

//use this instead of count()
orestisf
  • 1,396
  • 1
  • 15
  • 30