[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:31:20 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 utsavmadaan823):
Replying to [comment:34 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.
Please suggest me alternative solution i am open to any solution. I was
redirected to this ticket when i was getting these notice using
woocommerce (calling is_woocommerce()). Reading this i think the ticket
hasn't been resolved so suggested that suppression thing that someone may
use if they know what they are doing.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29660#comment:35>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list