Here is the error i found in the debug file:
[09-Jan-2024 16:31:42 UTC] PHP Warning: Trying to access array offset on value of type bool in /home/desimarkethubonline.com/public_html/wp-content/plugins/adminimize/inc-setup/dashboard.php on line 154
The given code fixed the issue. I updated this code in the dashboard.php for the adminimize folder. Let me know if I did right or wrong. If it is right, please update in the next update of your plugin. Thx.
/**
- Get all registered dashboard widgets.
*
- @return array
*/
function _mw_adminimize_get_dashboard_widgets() { global $wp_meta_boxes; $widgets = array();
if ( ! isset( $wp_meta_boxes[‘dashboard’] ) ) {
return $widgets;
} foreach ( (array) $wp_meta_boxes[‘dashboard’] as $context => $datas ) {
foreach ( (array) $datas as $priority => $data ) {
foreach ( (array) $data as $widget => $value ) { $value['title'] = ( isset( $value['title'] ) && ! is_array( $value['title'] ) ) ? $value['title'] : ''; $widgets[ $widget ] = array( 'id' => $widget, 'title' => strip_tags( preg_replace( '/( |)<span.*span>/im', '', $value['title'] ) ), 'context' => $context, 'priority' => $priority, ); }} } return $widgets;
}
Thanks for you solution, Misty Reese, it worked like a charm.
I had the same problem with dozens of error lines and editing the file with your directions worked.
I hope it will also be fixed soon in the next update.
@bueltge – We’re getting that warning on our site too, as well as this other warning:
Deprecated: Automatic conversion of false to array is deprecated in /code/wp-content/plugins/adminimize/inc-setup/dashboard.php on line 154
They probably just need a quick conditional check added to avoid some of PHP 8.2’s deprecations.
Should be fixed in 1.11.11.