Support » Requests and Feedback » No posts in a category: error

  • lars

    (@lars)


    Selecting a category from edit.php in which there are no posts returns three PHP warnings [1] and one SQL[2] error.

      1. Invalid argument supplied for foreach() in wp-blog-header.php line 325
      2. implode(): Bad arguments in wp-blog-header.php line 328.
      3. Invalid argument supplied for foreach() in wp-blog-header.php line 335
    1. [You have an error in your SQL syntax near ‘)’ at line 4]
      SELECT DISTINCT…
Viewing 6 replies - 1 through 6 (of 6 total)
  • Anonymous

    A discussion has started on this over here. The IN clause is empty, causing the problem.

    lars

    (@lars)

    Since the thread you refer to has a subject line that is completely unrelated to the specific problem at hand, I have asked that the discussion be moved here instead.

    I’ve just committed some fixes to CVS which should solve this problem.

    eryanv

    (@eryanv)

    @anonymous
    The IN() clause being empty only causes the visable SQL error and the second foreach() error. It’s the previous SQL request that doesn’t get anything and begins to cause this mess.
    Anyways, it’s fixed.

    lars

    (@lars)

    Great, thanks dougal!

    Nick Momrik

    (@mtdewvirus)

    Thanks dougal!! Works great! 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘No posts in a category: error’ is closed to new replies.