[wp-trac] [WordPress Trac] #38225: Unreachable code in get_body_class()?

WordPress Trac noreply at wordpress.org
Tue Oct 4 10:33:27 UTC 2016


#38225: Unreachable code in get_body_class()?
--------------------------+-----------------------------
 Reporter:  danburzo      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Please note that this is just by reading through the source code for
 get_body_class() and collating that with the docs, so I might be wrong,
 but would not this code branch be unreachable?

 {{{
  if (is_single()) {
     ...
     if (is_attachment()) {
       // Unreachable?
     }
  }
 }}}

 In file: https://core.trac.wordpress.org/browser/trunk/src/wp-includes
 /post-template.php#L570

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38225>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list