• 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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • 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
    }
    Thread Starter finandom

    (@finandom)

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

    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?

    Thread Starter finandom

    (@finandom)

    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! ??

    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Problems with my WordPress Category page’ is closed to new replies.