[wp-trac] [WordPress Trac] #41099: update_option return value ambiguous
WordPress Trac
noreply at wordpress.org
Wed Jun 21 09:33:25 UTC 2017
#41099: update_option return value ambiguous
--------------------------------+------------------------------
Reporter: cloughit | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Options, Meta APIs | Version: 4.8
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------------+------------------------------
Comment (by alexvorn2):
I think in this case the function should return true, and that's all.
update_option( 'foo', 'ram' ) - should return true
update_option( 'foo', 'bar' ) - should return true
update_option( 1, 'ram' ) - should return false (Line 344 - error
inserting in database)
update_option( ' ', 'ram' ) - should return false (Line 263 - empty option
name)
To do this we need to change how the function works.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41099#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list