wordpress-develop/tests/phpunit/tests
Gary Pendergast d2f41560d3 Formatting: Loosen the type checking in _sanitize_text_fields().
[44618] added strict type checking to `_sanitize_text_fields()`, which has caused some compat issues with plugins.

We can loosen the type checking to only reject objects and arrays, and cast other types to string.

Props Nick_theGeek, pento.
Fixes #41450.



git-svn-id: https://develop.svn.wordpress.org/trunk@44731 602fd350-edb4-49c9-b593-d223f7449a82
2019-02-07 23:34:22 +00:00
..
actions Code is Poetry. 2017-11-30 23:09:33 +00:00
admin PHPCS: Fix formatting issues introduced in [44670]. 2019-01-21 19:56:47 +00:00
ajax REST API: Restore use of wp_ajax_ajax_tag_search() for tag search. 2019-01-10 02:36:40 +00:00
attachment Code is Poetry. 2017-11-30 23:09:33 +00:00
blocks REST API: Preserve unknown, respect null in server-side block rendering. 2018-12-17 17:59:44 +00:00
bookmark General: Fix existing coding standard violations in bookmark tests, as outlined in [44546]. 2019-01-10 21:16:49 +00:00
canonical Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
category Taxonomy: Make sure wp_list_categories() correctly outputs term name of 0. 2018-09-02 22:08:05 +00:00
comment Comments: Show the "awaiting moderation" message when comment cookies are disabled. 2019-01-21 01:33:50 +00:00
customize Customizer: Fix a coding standards issue introduced in [44580]. 2019-01-14 07:22:03 +00:00
date Tests: Fix the tests for the c and r formats in date_i18n(). 2019-01-29 01:19:30 +00:00
db Code is Poetry. 2017-11-30 23:09:33 +00:00
dependencies Docs: Fix the last handful of incorrect @since 5.0.0 docblock tags. 2019-01-17 06:45:58 +00:00
editor Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
external-http Embeds: Remove the external oEmbed tests for YouTube. 2017-10-03 16:51:25 +00:00
feed Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
filesystem Tests: Add missing parent::setUp() calls to all test classes. 2019-01-14 04:54:01 +00:00
formatting Formatting: Loosen the type checking in _sanitize_text_fields(). 2019-02-07 23:34:22 +00:00
functions Tests: Add tests for the __return*() functions. 2019-01-21 00:32:33 +00:00
general Coding Standards: Fix and whitelist variable names. 2019-01-12 06:05:55 +00:00
hooks Code is Poetry. 2017-11-30 23:09:33 +00:00
http Tests: Add missing parent::setUp() calls to all test classes. 2019-01-14 04:54:01 +00:00
image Tests: Add missing parent::setUp() calls to all test classes. 2019-01-14 04:54:01 +00:00
import Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
includes Bootstrap/Load: Fix fatal error when passing a WP_Error to wp_die(). 2019-01-22 08:51:56 +00:00
l10n I18N: Fix JavaScript translations for subdirectory installations. 2018-12-18 23:09:51 +00:00
link Link Template: In get_adjacent_post(), move the sanitisation of $excluded_terms earlier. 2019-01-15 01:53:02 +00:00
load Bootstrap: Enhance core's memory limit handling. 2016-07-08 14:36:37 +00:00
media Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
menu Nav Menus: Fix a PHP 7.3 error when switching themes. 2018-12-14 05:15:54 +00:00
meta Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
multisite Multisite: After creating a new blog, ensure the blog cache is correctly cleaned up. 2019-02-07 06:03:32 +00:00
oembed Tests: Add missing parent::setUp() calls to all test classes. 2019-01-14 04:54:01 +00:00
option Options: Avoid unnecessary DB calls when updating network options. 2019-01-21 04:26:33 +00:00
pomo Tests: Add missing parent::setUp() calls to all test classes. 2019-01-14 04:54:01 +00:00
post Build/Test Tools: Add support for PHPUnit 7.x. 2019-01-28 14:10:24 +00:00
privacy Privacy: Add unit tests for privacy erasure fulfillment notifications. 2019-01-10 02:06:44 +00:00
query Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
rest-api Build/Test Tools: Correct WP_Test_REST_Schema_Sanitization::test_type_string() to check for both 1.1 float and '1.10' string explicitly. 2019-01-28 16:53:14 +00:00
rewrite Tests: Add missing parent::setUp() calls to all test classes. 2019-01-14 04:54:01 +00:00
taxonomy Tests: Add missing parent::setUp() calls to all test classes. 2019-01-14 04:54:01 +00:00
term REST API: Move object type-specific metadata integrations from the wrapper functions to the low-level Meta API functions. 2018-12-12 03:02:00 +00:00
theme Themes: Introduce responsive embeds support. 2018-12-14 01:49:46 +00:00
url Privacy: Add template tags for building link to privacy policy page. 2018-04-25 15:54:29 +00:00
user Bootstrap/Load: Revert fatal error recovery mechanism from 5.1 to polish for 5.2. 2019-01-30 11:00:30 +00:00
widgets Widgets: Don't log invalid HTML in the Text Widget. 2019-01-14 05:04:12 +00:00
xmlrpc Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
actions.php Code is Poetry. 2017-11-30 23:09:33 +00:00
adminbar.php Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
auth.php Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
avatar.php Coding Standards: Fix and whitelist variable names. 2019-01-12 06:05:55 +00:00
basic.php Build/Test tools: Remove unnecessary PHP functionality tests from the test suite. 2017-12-09 23:08:24 +00:00
cache.php Code is Poetry. 2017-11-30 23:09:33 +00:00
canonical.php Code is Poetry. 2017-11-30 23:09:33 +00:00
category.php Code is Poetry. 2017-11-30 23:09:33 +00:00
comment-submission.php Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
comment.php Privacy: Don't replace comment author URL and email with anything. 2018-07-17 08:59:30 +00:00
compat.php Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
cron.php Cron: Move logic for finding the next event's timestamp. 2019-01-23 23:07:39 +00:00
db.php WPDB: Check that $wpdb->last_result is countable before counting with it. 2018-12-17 18:38:13 +00:00
dbdelta.php Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
dependencies.php Code is Poetry. 2017-11-30 23:09:33 +00:00
file.php Code is Poetry. 2017-11-30 23:09:33 +00:00
filters.php Code is Poetry. 2017-11-30 23:09:33 +00:00
functions.php Build Tools: Upgrade WPCS to 2.0.0. 2019-01-18 02:14:24 +00:00
kses.php KSES: Allow the download attribute on <a> tags. 2018-12-14 03:27:55 +00:00
l10n.php Build/Test Tools: Fix coding standards issues after [44515] and [44514]. 2019-01-09 12:36:43 +00:00
link.php Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
locale.php Tests: Add missing parent::setUp() calls to all test classes. 2019-01-14 04:54:01 +00:00
mail.php Code is Poetry. 2017-11-30 23:09:33 +00:00
media.php Media: Store audio creation date in meta. 2019-01-10 01:31:52 +00:00
meta.php Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
multisite.php Code is Poetry. 2017-11-30 23:09:33 +00:00
pluggable.php Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
post.php Permalinks: Add a pre_wp_unique_post_slug filter. 2019-01-08 03:46:58 +00:00
query.php Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
rest-api.php REST API: Encourage proper usage of register_rest_route(). 2019-01-11 18:18:41 +00:00
rewrite.php Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
shortcode.php Coding Standards: Extract extract() from the codebase. 2019-01-12 03:19:23 +00:00
taxonomy.php Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
template.php Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
term.php Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
theme.php Bundled Themes: Make twentynineteen the default theme. 2018-12-14 02:48:14 +00:00
upload.php Code is Poetry. 2017-11-30 23:09:33 +00:00
url.php Code is Poetry. 2017-11-30 23:09:33 +00:00
user.php Build Tools: Upgrade WPCS to 2.0.0. 2019-01-18 02:14:24 +00:00
walker.php Code is Poetry. 2017-11-30 23:09:33 +00:00
widgets.php Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
wp.php Tests: Add missing parent::setUp() calls to all test classes. 2019-01-14 04:54:01 +00:00