Make WordPress Core

Opened 2 years ago

#57152 new defect (bug)

Trying to access array offset on value of type bool (class-wp-recovery-mode-email-service.php)

Reported by: mayhem30's profile Mayhem30 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.1.1
Component: General Keywords:
Focuses: Cc:

Description

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:

                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.

Change History (0)

Note: See TracTickets for help on using tickets.