[wp-trac] [WordPress Trac] #31147: make sure $notoptions is an array before assigning array key value

WordPress Trac noreply at wordpress.org
Tue Mar 10 18:15:10 UTC 2015


#31147: make sure $notoptions is an array before assigning array key value
--------------------------------+------------------------------
 Reporter:  hauvong             |       Owner:
     Type:  enhancement         |      Status:  new
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  Options, Meta APIs  |     Version:  2.2
 Severity:  normal              |  Resolution:
 Keywords:  has-patch           |     Focuses:
--------------------------------+------------------------------
Changes (by ocean90):

 * milestone:  4.2 => Awaiting Review


Comment:

 I would be more interested in why `wp_cache_get( 'notoptions', 'options'
 );` returns a string.

 @hauvong, do you know what the value of `$notoptions` is in such a case?
 @westonruter had mentioned in [https://github.com/Automattic/vip-
 quickstart/issues/216#issuecomment-59476660 this comment] that it's
 `"{sitename} Sites"`. Can you confirm that?

 If we're going to force `$notoptions` to be an array it should probably
 happen before `if ( isset( $notoptions[ $option ] ) ) {`.

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


More information about the wp-trac mailing list