• Resolved edgarlin

    (@edgarlin)


    I install the new 2.3.1 version and import the old (2.0.5) mysql data and upgrade database and got the error at single post as below:

    Warning: Invalid argument supplied for foreach() in /xxxxx/wp-includes/comment.php on line 821.

    So how could I solve it? Or is it some bug?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter edgarlin

    (@edgarlin)

    I found that if there is comment existed, the error is gone, so it looks like comment is related.

    Thread Starter edgarlin

    (@edgarlin)

    After several test, I found that is due to I change the wp-db.php (for Chinese character when upgrade from 2.0.5 to 2.3.1), the file is downloaded at http://trac.wordpress.org/browser/tags/1.5.1.3/wp-includes/wp-db.php.

    So I change back to original wp-db.php and use another way to fix the wrong Chinese code (at WP-config.php change the define(‘DB_CHARSET’, ‘utf8’) to define(‘DB_COLLATE’, ”); and the problem is fixed.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Warning: Invalid argument supplied for foreach() in comment.php on line 821’ is closed to new replies.