[wp-trac] [WordPress Trac] #30380: get_transient doesn't check the return of get_option

WordPress Trac noreply at wordpress.org
Tue Jul 7 17:10:35 UTC 2015


#30380: get_transient doesn't check the return of get_option
---------------------------------+--------------------------
 Reporter:  jamesgol             |       Owner:  ocean90
     Type:  defect (bug)         |      Status:  closed
 Priority:  low                  |   Milestone:  4.3
Component:  Options, Meta APIs   |     Version:  2.8
 Severity:  normal               |  Resolution:  fixed
 Keywords:  has-patch has-tests  |     Focuses:  performance
---------------------------------+--------------------------

Comment (by ericmann):

 Replying to [comment:24 ocean90]:
 > [attachment:patch-transient-wtests-5.2.diff] looks good. Only
 `add_action( 'delete_option', array( $a, 'delete_option' ) );` should be
 `add_action( 'delete_option', array( $a, 'action' ) );` since a
 `delete_option` method doesn't exist.

 Good catch. Since the action is only added to verify that it's not
 invoked, the tests pass either way. Thanks for catching it, though! :-)

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


More information about the wp-trac mailing list