[wp-trac] [WordPress Trac] #50122: PHP Notice: Trying to access array offset on value of type bool in ...

WordPress Trac noreply at wordpress.org
Thu May 7 23:27:55 UTC 2020


#50122: PHP Notice: Trying to access array offset on value of type bool in ...
--------------------------+-----------------------------
 Reporter:  franzarmas    |      Owner:  (none)
     Type:  defect (bug)  |     Status:  assigned
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  5.4.1
 Severity:  normal        |   Keywords:  php74
  Focuses:                |
--------------------------+-----------------------------
 Hello,

 I just updated my version of PHP 7.4 and I see that one of my functions
 produces `PHP Notice`.

 My code is:

 {{{
 #!div style="font-size: 80%"
 Code highlighting:
   {{{#!php
 /**
  * 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

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50122>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list