[wp-trac] [WordPress Trac] #20712: Wrong data type returned from get_option for "page_on_front" after update_option

WordPress Trac wp-trac at lists.automattic.com
Sun May 20 08:29:35 UTC 2012


#20712: Wrong data type returned from get_option for "page_on_front" after
update_option
--------------------------+-----------------------------
 Reporter:  tszming       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  3.3.2
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 {{{
 echo gettype(get_option("page_on_front")); // return string
 update_option("page_on_front", "123");
 echo gettype(get_option("page_on_front")); // return integer
 }}}


 You can repeat the steps and it give consistent result, so `get_option`
 return the wrong data type ONLY when it is after `update_option`

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


More information about the wp-trac mailing list