[wp-trac] [WordPress Trac] #40007: update_option function does not work if the $value argument is false on a nonexistent option

WordPress Trac noreply at wordpress.org
Thu Mar 2 13:41:46 UTC 2017


#40007: update_option function does not work if the $value argument is false on a
nonexistent option
--------------------------+------------------------------
 Reporter:  alexvorn2     |       Owner:
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by subrataemfluence):

 Although `false` is not being recognized a value 0 is actually adding /
 updating record in the table. So it is only Boolean `false` which is not
 working! I am under an impression that this value has a conflict somewhere
 in the function!

 `true` - works. Value added is 1
 `1` - works. Value added is 1
 `false` - does not work - No record added
 `0` - works - Value added is 0
 `'true'` - works. Value added is 'true'
 `'false'` - works. Value added is 'false'

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


More information about the wp-trac mailing list