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

WordPress Trac noreply at wordpress.org
Tue Jan 27 22:23:17 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:  trunk
 Severity:  normal              |   Keywords:
  Focuses:                      |
--------------------------------+-----------------------------
 In a multi sites worpress setup environment, there are times where
 get_options would cause illegal string offset warnings.

 The issue is caused by $notoptions that can contain a string from
 get_get_cache call.
 To avoid the potential warning errors, we should check to make sure
 $notoptions variable is an array before trying to assign array indexed
 value to it.

 For reference: https://github.com/Automattic/vip-quickstart/issues/216

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


More information about the wp-trac mailing list