Opened 6 years ago
Closed 6 years ago
#50122 closed defect (bug) (duplicate)
PHP Notice: Trying to access array offset on value of type bool in ...
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 5.4.1 |
| Component: | Administration | Keywords: | |
| Focuses: | Cc: |
Description
Hello,
I just updated my version of PHP 7.4 and I see that one of my functions produces PHP Notice.
My code is:
Code highlighting:
/**
* Remove widgets of the dashboard.
*/
function remove_dashboard_widgets() {
remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );
}
add_action( 'wp_dashboard_setup', 'remove_dashboard_widgets' );
Generate this:
[07-May-2020 23:25:38 UTC] PHP Notice: Trying to access array offset on value of type bool in /home/...../wp-admin/includes/template.php on line 1079
[07-May-2020 23:25:38 UTC] PHP Notice: Trying to access array offset on value of type bool in /home/...../wp-admin/includes/template.php on line 1080
[07-May-2020 23:25:38 UTC] PHP Notice: Trying to access array offset on value of type bool in /home/...../wp-admin/includes/template.php on line 1081
Change History (1)
Note: See
TracTickets for help on using
tickets.
Hi there, welcome to WordPress Trac!
Thanks for the report, we're already tracking this issue in #50019.