Closed daronspence closed 1 year ago
@Daronspence I don't think I'm seeing what you're seeing. In master
on 129 we've got: $query->is_attachment = false;
. Is that what you're referring to?
ahhhhh, wait a second!
global $wp_query;
$wp_query->is_404 = false;
$query->is_attachment = false;
$query->is_page = true;
Looks like those two calls to $query
need to be rectified in some way. Is this something you'd be up for looking into more @Daronspence ?
I can take a stab at it @jarednova but I'm not sure what the correct fix would be... maybe instantiating $query
as a stdObject
if it comes in as the default value?
Not sure tbh 🙁
Just for a giggle, I swapped it from $query
to $wp_query
and that generated 200 warnings on the same page. Not good hah.
Since that $query
variable is currently undefined in the function scope, those 2 lines could be removed without any effect that I can see. My IDE is complaining about it being undefined any way. I'll submit a PR for that, but will let you decide if that's the correct option.
PHP version
7.2.29
Trace
Looks like there is a reliance on this behavior. I'm not sure if it will be removed in a future version of PHP but there probably shouldn't be a reliance on it? 😄
Thoughts?