Opened 3 weeks ago
Last modified 3 weeks ago
#62816 new defect (bug)
Trying to access array offset on false in /{PATH}/wp-includes/class-wp-recovery-mode-email-service.php on line 367
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | has-patch |
Focuses: | Cc: |
Description
In wp-includes/class-wp-recovery-mode-email-service.php on line 344, is this:
$plugin = $this->get_plugin( $extension );
however WP_Recovery_Mode_Email_Service::get_plugin() can return false, and when that happens the check null !== $plugin on line 363 passes, but then
$debug['plugin']
on line 364 causes the following error:
PHP Warning: Trying to access array offset on false in /{PATH}/wp-includes/class-wp-recovery-mode-email-service.php on line 367
The solution is to change line 363 to:
if ( is_array( $plugin ) ) {
Change History (5)
This ticket was mentioned in PR #8141 on WordPress/wordpress-develop by @abcd95.
3 weeks ago
#1
- Keywords has-patch added
#2
@
3 weeks ago
Test Report
Description
This report validates whether the indicated patch works as expected.
Patch tested: https://github.com/WordPress/wordpress-develop/pull/8141
Environment
- WordPress: 6.8-alpha-59274-src
- PHP: 8.2.27
- Server: nginx/1.27.3
- Database: mysqli (Server: 8.4.3 / Client: mysqlnd 8.2.27)
- Browser: Chrome 132.0.0.0
- OS: macOS
- Theme: Twenty Twenty-Four 1.3
- MU Plugins: None activated
- Plugins: Test Reports 1.2.0
Actual Results
✅ Issue resolved with patch.
Supplemental Artifacts
Before Fix:
After Fix: No Warnings
@ankitkumarshah commented on PR #8141:
3 weeks ago
#3
This ticket was mentioned in PR #8143 on WordPress/wordpress-develop by @mukesh27.
3 weeks ago
#4
Trac ticket: https://core.trac.wordpress.org/ticket/62816
@mukesh27 commented on PR #8141:
3 weeks ago
#5
Closing as #8143 is better approach. Feel free to reopen.
Trac ticket: 62816