mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-12-03 11:31:39 +00:00
Query: Improve sanitization within WP_Meta_Query.
Props vortfu, xknown, dd32. git-svn-id: https://develop.svn.wordpress.org/trunk@52455 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user