[wp-trac] [WordPress Trac] #26728: Previous fix for get_queried_object, gives notices for tax queries
WordPress Trac
noreply at wordpress.org
Fri Dec 27 18:21:03 UTC 2013
#26728: Previous fix for get_queried_object, gives notices for tax queries
--------------------------+--------------------
Reporter: layotte | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.8.1
Component: Query | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+--------------------
Comment (by SergeyBiryukov):
Seems like [attachment:26728.diff] would be the correct fix there.
Replying to [comment:4 Chouby]:
> That would be strange enough if this notice was not present in WP < 3.8
since [26864] reintroduced the test exactly as it was before [26007].
Not exactly, `$query` was defined at that point before [26007] (see line
3253 on the left).
Replying to [comment:5 layotte]:
> If $this->is_tax is always true, than the line 3265 above will always be
true:
No, it's vice versa. If we're inside that condition, then either
`$this->is_category`, `$this->is_tag`, or `$this->is_tax` is true. We
check for `$this->is_category` and `$this->is_tag` above, so if they are
both false, that means `$this->is_tax` is true.
Replying to [comment:7 Otto42]:
> 26728.diff looks good, but I don't think the check for if ( $query[
'terms' ] ) is necessary.
Related: [22450]
--
Ticket URL: <http://core.trac.wordpress.org/ticket/26728#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list