Bug: Trying to access array offset on value of type bool
-
Dear Ultimate Dashboard Support
We’re currently experiencing a PHP Warning using Ultimate Dashboard
PHP Warning: Trying to access array offset on value of type bool in /REDACTED/wp-content/plugins/ultimate-dashboard/modules/widget/class-widget-output.php on line 243
Looking into the code we can see inside the file
/ultimate-dashboard/modules/widget/class-widget-output.php on line 243
That the code is this:
foreach ( $saved_widgets as $id => $widget ) {
remove_meta_box( $id, 'dashboard', $widget['context'] );
}To address the PHP Warning, there should probably be a check like this:
foreach ( $saved_widgets as $id => $widget ) {
if( is_array($widget) && isset($widget['context'])) {
remove_meta_box( $id, 'dashboard', $widget['context'] );
}
}Hope to see a fix in a future release ?? ??
The page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.