WordPress.org

Ready to get started?Download WordPress

Forums

Warning: Invalid argument supplied for foreach() (3 posts)

  1. submo6
    Member
    Posted 9 years ago #

    I have recently reinstalled wordpress, after a devistating accident where I deleted the Database. I managed to restore the databse and reinstall wordpress.

    I am currently getting this error at the top of my index page:

    "Warning: Invalid argument supplied for foreach() in /home/****/public_html/wp/wp-blog-header.php on line 478"

    How would I go about removing this error, on lines 476-480 in wp-blog-header.php says this:
    [code]
    WHERE category_id = cat_ID AND post_id = ID AND post_id IN ($post_id_list)");

    foreach ($dogs as $catt) {
    $category_cache[$catt->ID][] = $catt;
    }[/code]

    Aidan

  2. NuclearMoose
    Member
    Posted 9 years ago #

    Have you got any empty categories?

  3. submo6
    Member
    Posted 9 years ago #

    Yeah, I guess I do.

    How would I go about assigning them a catagory? When I go to the edit post in the admin panel, it comes up with an error that says:

    Well I cant actually get the error message right now because the server is down where my site is located. Though Error messages appear there as well, in the catagory section, as well as umm, in the create a new post section, where the catagory section would be in....

    I did restore my databse a little oddly, I had some how only had a txt file of just my posts and my comments, so I just restored those two tables....

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.