Forums

Problems with my WordPress Category page (6 posts)

  1. Finandom
    Member
    Posted 3 years ago #

    Hi everyone!

    I was using an older version of wordpress. All the time it is working fine. But yesterday, I found that there are 2 error lines appeared on my category page. Just above the header. The line is something like this:

    Warning: Invalid argument supplied for foreach() in /home/finandom/public_html/blog/wp-includes/classes.php on line 148

    So I thought it is time for me to upgrade to the latest version. So I quickly upgrade to wordpress 2.7 but the problem still exists. This time the line number is different. Here is the line:

    Warning: Invalid argument supplied for foreach() in /home/finandom/public_html/blog/wp-includes/classes.php on line 255

    Warning: Invalid argument supplied for foreach() in /home/finandom/public_html/blog/wp-includes/query.php on line 1401

    Guys, please help me to solve this problem. I already searched around the web but didn't get any solutions. Please help me, thank you for your time.

    Harrison.

  2. reflexionstudios
    Member
    Posted 3 years ago #

    I'm guessing you have a broken custom function somewhere, or you're trying to pass some arguments that don't exist or are invalid.

    global $post;
    foreach($var as $post) {
         //do stuff
    }
  3. Finandom
    Member
    Posted 3 years ago #

    Thanks for reply, but I never touch the coding except modifying the themes

  4. reflexionstudios
    Member
    Posted 3 years ago #

    Can you post line #255 of classes.php and line #1401 of query.php? If you've never touched those pages, I'm guessing there won't be anything wrong with them. Modifying themes does, however, involve messing with code so it's possible you have conflicting variable(s) etc. Have you written any custom functions in functions.php?

  5. Finandom
    Member
    Posted 3 years ago #

    No, I never touch the funcstions.php. In fact, I just upgraded my wordpress to 2.7 with a fresh copy. So I think the function.php is with the original coding.

    line # 255: foreach ( $GLOBALS['wp_taxonomies'] as $taxonomy => $t )

    line #1401: foreach ( $GLOBALS['wp_taxonomies'] as $t ) {

    Thanks for your helps! :)

  6. reflexionstudios
    Member
    Posted 3 years ago #

    Hard to say without more info. Try a fresh(er) install and compare files from the downloaded zip and your server. Maybe your upload missed a file or something.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.