[wp-trac] [WordPress Trac] #23428: comments_open causes PHP notice in certain cases

WordPress Trac noreply at wordpress.org
Fri Feb 8 21:51:39 UTC 2013


#23428: comments_open causes PHP notice in certain cases
-----------------------------+--------------------------
 Reporter:  willnorris       |       Type:  defect (bug)
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  Comments
  Version:  trunk            |   Severity:  normal
 Keywords:  has-patch        |
-----------------------------+--------------------------
 when `comments_open()` is called for a non-existant post (either a bad ID,
 or no ID passed and called from a non-single page), a PHP notice is
 caused.  Ideally, plugins shouldn't be doing this, but a simple null check
 in `comments_open()` fixes the problem.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23428>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list