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

WordPress Trac noreply at wordpress.org
Thu May 28 13:57:34 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):

 For reference, the stack trace


 {{{
 Error message
 E_WARNING: Illegal string offset 'users_can_register'

 in get_site_option called at <path>/web/wp-includes/option.php (990)
 …gins/better-wp-security/modules/free/hide-backend/
 class-itsec-hide-backend.php (123)
 in ITSEC_Hide_Backend::execute_hide_backend called at ? (?)
 in call_user_func_array called at <path>/web/wp-includes/plugin.php (505)
 in do_action called at <path>/web/wp-settings.php (353)
 in require_once called at <path>/wp-config.php (180)
 in require_once called at <path>/web/wp-load.php (34)
 in require_once called at <path>/web/wp-blog-header.php (12)
 in require called at <path>/web/index.php (17)
 }}}

 {{{
 Error message
 E_WARNING: Illegal string offset 'users_can_register'

 in get_site_option called at <path>/web/wp-includes/option.php (990)
 …inspirewp/web/wp-content/plugins/better-wp-security/core/
 class-itsec-files.php (418)
 in ITSEC_Files::file_writer_init called at ? (?)
 in call_user_func_array called at <path>/web/wp-includes/plugin.php (505)
 in do_action called at <path>/web/wp-settings.php (237)
 in require_once called at <path>/wp-config.php (180)
 in require_once called at <path>/web/wp-load.php (34)
 in require_once called at <path>/web/wp-blog-header.php (12)
 in require called at <path>/web/index.php (17)
 }}}

 It seems to be stuff that calls the site options too early at a guess. It
 seems to happening when sites have not been hit for a while and get
 accessed. Like first person to hit in the morning or a Sunday evening....

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


More information about the wp-trac mailing list