[wp-trac] Re: [WordPress Trac] #5185: SQL Error on feeds for invalid posts

WordPress Trac wp-trac at lists.automattic.com
Sat Dec 22 07:30:36 GMT 2007


#5185: SQL Error on feeds for invalid posts
----------------------------------------------------+-----------------------
 Reporter:  robertaccettura                         |        Owner:  pishmishy
     Type:  defect                                  |       Status:  assigned 
 Priority:  normal                                  |    Milestone:  2.4      
Component:  General                                 |      Version:  2.3      
 Severity:  normal                                  |   Resolution:           
 Keywords:  sql, error, feed, query.php, has-patch  |  
----------------------------------------------------+-----------------------
Changes (by ruckus):

 * cc: ruckus (added)
  * keywords:  sql, error, feed, query.php => sql, error, feed, query.php,
               has-patch

Comment:

 Here is a patch to protect the SQL query for comments from being executed
 when there are no posts found.  I'm using `!empty($this->posts)` to match
 the code block just below that fetches the post status (and also refers to
 `$this->posts[0]`).

-- 
Ticket URL: <http://trac.wordpress.org/ticket/5185#comment:16>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list