[wp-trac] [WordPress Trac] #29660: Functions in wp_includes/query.php assume non-null return value from get_queried_object

WordPress Trac noreply at wordpress.org
Wed May 13 22:23:36 UTC 2020


#29660: Functions in wp_includes/query.php assume non-null return value from
get_queried_object
--------------------------+-----------------------------
 Reporter:  yellyc        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  Query         |     Version:  4.0
 Severity:  normal        |  Resolution:
 Keywords:  2nd-opinion   |     Focuses:
--------------------------+-----------------------------

Comment (by Howdy_McGee):

 Replying to [comment:33 utsavmadaan823]:
 > Maybe until it is totally fixed we can use function calls like this to
 stop logging those particular notices -
 >
 > @is_woocommerce();

 Error suppression operators are more of a hindrance than a helper. I don't
 think ( and hope ) any patches with suppression operators are being
 accepted as it's against general coding standards.

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


More information about the wp-trac mailing list