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

WordPress Trac noreply at wordpress.org
Sun May 24 13:50:50 UTC 2015


#31147: make sure $notoptions is an array before assigning array key value
--------------------------------+-----------------------------
 Reporter:  hauvong             |       Owner:
     Type:  enhancement         |      Status:  reopened
 Priority:  normal              |   Milestone:  Future Release
Component:  Options, Meta APIs  |     Version:  2.2
 Severity:  normal              |  Resolution:
 Keywords:  has-patch           |     Focuses:
--------------------------------+-----------------------------

Comment (by spacedmonkey):

 This bug is happening for me all the time now (twice a week). So here are
 some more details on my setup.

 I am hosting a large scale WP multisite in AWS, over 8 web servers. I have
 remote memcache servers that all the web servers talk to. It seems that
 somehow cache value {$wpdb->siteid}:notoptions  (group - site-options), is
 getting set to a string instead of an array. I believe this is happening
 outside of WordPress and is possibly a issue with AWS. I believe it is a
 communication issue with memcache, as once (and I can't confirm this as I
 haven't seen it again) when using WP CLI to review the cache value, I saw
 http connection header set as the value. As the value is expected to be an
 array and not a string, the code errors, as it gets an Illegal string
 offset as the type is wrong. The error that new relic reports, is
 different everytime, as it is different keys it is trying to access in the
 array, but the error is effectively the same. It seem to be more likely to
 siteurl, but I have seen other array key being accessed.


 A cache flush / change of cache key clears the issue, but doesn't fix it.
 The patch provided seem like it will stop all the type errors I am getting
 in my reporting tools. I don't believe this will fix the problem all
 together because I am not sure that wordpress is to blame for the issue.
 Either way, the patch doesn't seem like it would hurt anything to just
 merge it....

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


More information about the wp-trac mailing list