[wp-trac] Re: [WordPress Trac] #8657: add filter to get_post_status() to allow overriding the status of objects

WordPress Trac wp-trac at lists.automattic.com
Mon May 11 15:18:30 GMT 2009


#8657: add filter to get_post_status() to allow overriding the status of objects
-------------------------+--------------------------------------------------
 Reporter:  DD32         |       Owner:  anonymous
     Type:  enhancement  |      Status:  new      
 Priority:  normal       |   Milestone:  2.8      
Component:  General      |     Version:  2.7      
 Severity:  normal       |    Keywords:  has-patch
-------------------------+--------------------------------------------------
Changes (by filosofo):

  * keywords:  has-patch tested commit => has-patch


Comment:

 You shouldn't do an is_integer check on the post id for get_post_type().
 Because PHP is loosely typed, !WordPress ends up passing around as strings
 a lot of things that look and act like integers.  So checking that the id
 is actually an integer is going to produce some perplexing bugs somewhere.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/8657#comment:5>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list