wordpress-develop/tests/phpunit/tests/query
Boone Gorges 41db99c31a Use field-specific sanitization in WP_Tax_Query::transform_query().
When terms are entered into the database, term fields are sanitized with
`sanitize_term_field()`. To ensure that the `SELECT ... WHERE` queries in
`WP_Tax_Query::transform_query()` are not broken by overzealous sanitization,
`sanitize_term_field()` should be used in that case as well. This fixes a bug
where a tax_query using 'field=name' would fail if the 'terms' parameter
contained characters (like spaces) that were improperly removed by
`sanitize_title_for_query()`.

Fixes #27810.

git-svn-id: https://develop.svn.wordpress.org/trunk@31346 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 02:01:24 +00:00
..
conditionals.php Add expectedIncorrectUsage flags for unit tests that generate invalid dates. 2014-10-17 00:40:06 +00:00
date.php Share fixtures across a number of query-related test classes. 2014-11-08 15:29:31 +00:00
dateQuery.php Introduced dayofweek_iso time param for WP_Date_Query. 2014-11-01 03:23:15 +00:00
isTerm.php Improve organiation of tax_query and meta_query unit tests. 2015-01-27 20:03:50 +00:00
metaQuery.php Modify `meta_query orderby syntax to use array keys as clause "handles". 2015-02-05 19:37:47 +00:00
parseQuery.php Check that search value is scalar before parsing. 2014-10-16 03:31:27 +00:00
postStatus.php When querying for a specific post, allow posts with a non-public status to be returned as long as that status is specified. 2015-02-01 20:25:42 +00:00
results.php When using WP_Query's 'fields' => 'ids' (or 'fields' => 'id=>parent'), make sure the returned result is always an array of integers. 2015-02-03 02:28:52 +00:00
search.php Add unit tests for searching by relevance. 2014-03-08 21:26:26 +00:00
setupPostdata.php Use correct notation for global functions in @covers test annotations. 2014-12-19 15:20:41 +00:00
taxQuery.php Use field-specific sanitization in WP_Tax_Query::transform_query(). 2015-02-06 02:01:24 +00:00
verboseRewriteRules.php Setup rewrite changes in tests in a predictable fashion. Don't mix method calls with wrapper function calls. 2014-07-03 01:42:57 +00:00