• Resolved Misty Reese

    (@mistyreese5)


    Error Description: This warning in the Adminimize plugin suggests that the code is trying to access an array offset on a boolean value, which is not possible.

    Solution: Check the Adminimize plugin for an update. If the issue persists, it may be necessary to report it to the plugin’s developers.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Misty Reese

    (@mistyreese5)

    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

    Thread Starter Misty Reese

    (@mistyreese5)

    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.

    Plugin Author Frank Bueltge

    (@bueltge)

    Should be fixed in 1.11.11.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP Warning (Trying to access array offset on value of type bool):’ is closed to new replies.