[wp-trac] [WordPress Trac] #49934: PHP Notice: Trying to get property 'name' of non-object in wp-admin/includes/class-wp-site-health.php on line 636

WordPress Trac noreply at wordpress.org
Mon May 18 04:31:36 UTC 2020


#49934: PHP Notice: Trying to get property 'name' of non-object in wp-
admin/includes/class-wp-site-health.php on line 636
-------------------------------------+---------------------
 Reporter:  juanlopez4691            |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  5.5
Component:  Site Health              |     Version:  5.2
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+---------------------

Comment (by SergeyBiryukov):

 It would be helpful to know the exact steps to reproduce the issue, as
 this code branch only runs if `is_child_theme()` is true, but
 `WP_Theme::parent()` only returns false if the current theme is not a
 child theme.

 So it seems like the notice is only issued if the current theme is either
 broken or not properly configured.

 Still, it seems like a good idea to avoid the PHP notice here, as the
 Themes screen should already give a proper error message for this case.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49934#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list