[wp-trac] [WordPress Trac] #33068: get_post() returning current object if 0

WordPress Trac noreply at wordpress.org
Tue Sep 1 21:57:26 UTC 2015


#33068: get_post() returning current object if 0
-------------------------------+------------------------------
 Reporter:  Rahe               |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:  3.5
 Severity:  normal             |  Resolution:
 Keywords:                     |     Focuses:
-------------------------------+------------------------------

Comment (by Rahe):

 I've added a patch file with the coding standards respected in the
 function.

 Maybe we can replace the line :

 {{{
         if ( ! $_post ) {
                 return null;
         }
 }}}

 by :
 {{{
         if ( ! $_post ) {
                 return;
         }
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33068#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list