mirror of
git://develop.git.wordpress.org/
synced 2025-04-09 14:42:05 +02:00
Query: Improve sanitization within WP_Meta_Query
.
Merges [52455] to the 5.9 branch. Props vortfu, xknown, dd32. git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52460 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
abb893a104
commit
73421fa84f
@ -848,7 +848,7 @@ class WP_Meta_Query {
|
||||
$clause_compare = strtoupper( $clause['compare'] );
|
||||
$sibling_compare = strtoupper( $sibling['compare'] );
|
||||
if ( in_array( $clause_compare, $compatible_compares, true ) && in_array( $sibling_compare, $compatible_compares, true ) ) {
|
||||
$alias = $sibling['alias'];
|
||||
$alias = preg_replace( '/\W/', '_', $sibling['alias'] );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -527,7 +527,7 @@ class WP_Tax_Query {
|
||||
|
||||
// The sibling must both have compatible operator to share its alias.
|
||||
if ( in_array( strtoupper( $sibling['operator'] ), $compatible_operators, true ) ) {
|
||||
$alias = $sibling['alias'];
|
||||
$alias = preg_replace( '/\W/', '_', $sibling['alias'] );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user