[wp-trac] [WordPress Trac] #55955: Setting a 'NOT EXISTS' tax query in 'pre_get_posts' action triggers a fatal error in wp-includes/canonical.php
WordPress Trac
noreply at wordpress.org
Thu Oct 27 15:26:24 UTC 2022
#55955: Setting a 'NOT EXISTS' tax query in 'pre_get_posts' action triggers a fatal
error in wp-includes/canonical.php
-------------------------------------------+---------------------
Reporter: codesdnc | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.1.1
Component: Canonical | Version: 6.0
Severity: normal | Resolution:
Keywords: php8 has-patch has-unit-tests | Focuses:
-------------------------------------------+---------------------
Comment (by kadamwhite):
For anybody running into this between now and when the patch goes live,
we've worked around it in our application by passing
{{{#!php
<?php
'terms' => array( 0 ),
}}}
within the tax_query array. Looking at how NOT EXISTS queries get parsed,
it seems like this terms parameter is not used at all, so it seems to
mitigate the PHP8 fatal without compromising application logic...
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55955#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list