[wp-trac] [WordPress Trac] #57152: Trying to access array offset on value of type bool (class-wp-recovery-mode-email-service.php)

WordPress Trac noreply at wordpress.org
Sat Nov 19 03:53:53 UTC 2022


#57152: Trying to access array offset on value of type bool (class-wp-recovery-
mode-email-service.php)
--------------------------+-----------------------------
 Reporter:  Mayhem30      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  6.1.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 After editing my functions.php file, WordPress emailed me to let me know I
 made a mistake and there was an error.

 When I checked the error log, I saw this :


 {{{
 [19-Nov-2022 03:14:01 UTC] PHP Parse error:  Unclosed '{' does not match
 ')' in /wp-content/themes/wonder/functions.php on line 552
 [19-Nov-2022 03:14:01 UTC] PHP Warning:  Trying to access array offset on
 value of type bool in /wp-includes/class-wp-recovery-mode-email-
 service.php on line 372
 [19-Nov-2022 03:14:01 UTC] PHP Warning:  Trying to access array offset on
 value of type bool in /wp-includes/class-wp-recovery-mode-email-
 service.php on line 373
 }}}

 The warnings are coming from $plugin[name] and [version] lines:
 {{{#!php
                 if ( null !== $plugin ) {
                         $debug['plugin'] = sprintf(
                                 /* translators: 1: The failing plugins
 name. 2: The failing plugins version. */
                                 __( 'Current plugin: %1$s (version %2$s)'
 ),
                                 $plugin['Name'],
                                 $plugin['Version']
                         );
                 }
 }}}

 The failure was not from a plugin, but from my functions file.

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


More information about the wp-trac mailing list