#62816 closed defect (bug) (fixed)
Trying to access array offset on false in /{PATH}/wp-includes/class-wp-recovery-mode-email-service.php on line 367
| Reported by: | afwebdev | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.0 |
| Component: | Site Health | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
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 (8)
This ticket was mentioned in PR #8141 on WordPress/wordpress-develop by @abcd95.
19 months ago
#1
- Keywords has-patch added
#2
@
19 months 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:
19 months ago
#3
This ticket was mentioned in PR #8143 on WordPress/wordpress-develop by @mukesh27.
19 months ago
#4
Trac ticket: https://core.trac.wordpress.org/ticket/62816
@mukesh27 commented on PR #8141:
19 months ago
#5
Closing as #8143 is better approach. Feel free to reopen.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Trac ticket: 62816