hellofromTonya
1c8de0817f
Code Modernization: Fix null to non-nullable deprecations in WP_Meta_Query::get_sql_for_clause().
...
In the `WP_Meta_Query::get_sql_for_clause()`, the `'value'` index from a meta query array is passed to the PHP native `trim()` function without prior validation.
In PHP 8.1, this could lead to a `trim(): Passing null to parameter #1 ($string) of type string is deprecated` notice.
`trim()` expects a text string and is only useful when ''passed'' a text string as no other variable type can contain whitespace.
Fixed now by verifying that the ''value'' is a string before processing it with `trim()`.
This issue is already covered by the existing `Tests_Meta_Query::test_null_value_sql()` and the `Tests_Meta_Query::test_convert_null_value_to_empty_string()` tests.
Follow-up to [17699], [29887], [29940].
Props jrf, hellofromTonya.
See #53635 .
Built from https://develop.svn.wordpress.org/trunk@51797
git-svn-id: http://core.svn.wordpress.org/trunk@51404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-10 16:01:03 +00:00
..
2021-09-01 19:08:24 +00:00
2021-07-15 18:55:29 +00:00
2021-08-26 12:59:02 +00:00
2021-07-28 10:06:59 +00:00
2021-09-02 22:18:00 +00:00
2021-09-09 15:18:55 +00:00
2021-04-14 23:10:04 +00:00
2021-05-24 02:18:58 +00:00
2021-09-10 00:02:59 +00:00
2021-08-10 13:45:57 +00:00
2021-08-18 14:08:56 +00:00
2021-08-18 21:58:57 +00:00
2021-05-11 19:42:02 +00:00
2021-09-09 21:40:57 +00:00
2021-09-09 19:42:56 +00:00
2021-08-10 13:04:57 +00:00
2021-09-09 20:13:57 +00:00
2021-08-26 18:24:58 +00:00
2021-06-21 06:06:57 +00:00
2021-08-15 12:45:59 +00:00
2021-08-11 09:08:01 +00:00
2021-07-02 14:35:58 +00:00
2021-07-01 21:12:58 +00:00
2021-08-26 12:59:02 +00:00
2021-08-26 19:10:58 +00:00
2021-05-20 00:04:56 +00:00
2021-06-08 23:32:56 +00:00
2021-03-04 00:14:04 +00:00
2021-07-03 21:42:59 +00:00
2021-07-01 21:29:56 +00:00
2021-05-25 18:47:59 +00:00
2021-06-06 14:05:56 +00:00
2021-09-09 12:39:59 +00:00
2021-09-09 13:03:55 +00:00
2021-09-09 13:03:55 +00:00
2021-09-09 13:03:55 +00:00
2021-09-09 12:39:59 +00:00
2021-09-09 13:03:55 +00:00
2021-07-19 21:14:57 +00:00
2021-05-24 07:38:58 +00:00
2021-08-03 11:12:55 +00:00
2021-06-15 15:22:58 +00:00
2021-06-15 15:22:58 +00:00
2021-06-15 15:22:58 +00:00
2021-05-25 14:20:57 +00:00
2021-06-15 15:22:58 +00:00
2021-07-28 10:06:59 +00:00
2021-07-28 10:06:59 +00:00
2021-07-30 19:35:58 +00:00
2021-07-30 19:35:58 +00:00
2021-09-04 00:39:04 +00:00
2021-05-30 19:18:01 +00:00
2021-07-30 19:35:58 +00:00
2021-07-30 19:35:58 +00:00
2021-09-09 14:32:57 +00:00
2021-09-09 21:40:57 +00:00
2021-07-30 19:35:58 +00:00
2021-09-08 23:29:58 +00:00
2021-06-17 14:37:00 +00:00
2021-06-05 15:46:57 +00:00
2021-08-03 11:02:00 +00:00
2021-07-01 21:12:58 +00:00
2021-07-01 21:02:57 +00:00
2021-09-09 20:39:58 +00:00
2021-09-09 20:39:58 +00:00
2021-09-09 20:39:58 +00:00
2021-05-28 18:04:57 +00:00
2021-09-10 16:01:03 +00:00
2021-07-30 19:35:58 +00:00
2021-06-15 10:24:57 +00:00
2021-07-30 10:53:58 +00:00
2021-04-04 18:30:05 +00:00
2021-02-22 19:18:12 +00:00
2021-07-30 19:35:58 +00:00
2021-07-30 19:35:58 +00:00
2021-05-15 17:38:05 +00:00
2021-07-30 19:35:58 +00:00
2021-02-20 17:10:11 +00:00
2021-07-30 19:35:58 +00:00
2021-08-30 14:09:58 +00:00
2021-08-26 12:59:02 +00:00
2021-08-02 22:31:56 +00:00
2021-03-04 00:14:04 +00:00
2021-09-09 13:03:55 +00:00
2021-06-23 01:34:58 +00:00
2021-06-04 10:47:58 +00:00
2021-08-10 12:54:56 +00:00
2021-08-16 20:17:57 +00:00
2021-07-30 19:35:58 +00:00
2021-07-30 19:35:58 +00:00
2021-07-03 21:42:59 +00:00
2021-04-02 15:49:05 +00:00
2021-07-22 13:07:57 +00:00
2021-08-30 15:20:56 +00:00
2021-07-09 01:18:57 +00:00
2021-05-25 08:27:57 +00:00
2021-08-10 19:44:59 +00:00
2021-09-02 22:18:00 +00:00
2021-03-20 18:30:08 +00:00
2021-05-15 17:38:05 +00:00
2021-08-26 12:59:02 +00:00
2021-09-09 22:56:56 +00:00
2021-09-02 08:30:58 +00:00
2021-09-02 08:30:58 +00:00
2021-09-08 23:29:58 +00:00
2021-05-15 17:38:05 +00:00
2021-09-03 01:37:57 +00:00
2021-08-11 09:08:01 +00:00
2021-06-30 17:44:58 +00:00
2021-07-06 20:21:57 +00:00
2021-08-04 14:25:58 +00:00
2021-06-24 20:55:58 +00:00
2021-07-03 21:32:58 +00:00
2021-08-17 22:08:57 +00:00
2021-07-06 20:21:57 +00:00
2021-07-28 10:02:00 +00:00
2021-06-19 20:57:01 +00:00
2021-07-01 21:29:56 +00:00
2021-07-03 11:31:58 +00:00
2021-07-01 21:29:56 +00:00
2021-05-04 15:01:58 +00:00
2021-04-26 15:38:05 +00:00
2021-07-14 08:14:01 +00:00
2021-06-15 15:22:58 +00:00
2021-08-26 12:59:02 +00:00
2021-07-03 21:42:59 +00:00
2021-03-23 23:02:05 +00:00
2021-09-10 00:02:59 +00:00
2021-06-15 15:22:58 +00:00
2021-05-15 17:38:05 +00:00
2021-09-10 15:03:57 +00:00
2021-05-25 14:20:57 +00:00
2021-05-25 14:20:57 +00:00
2021-05-24 08:37:55 +00:00
2021-06-22 10:00:50 +00:00
2021-08-03 18:14:58 +00:00
2021-09-09 21:40:57 +00:00
2021-08-26 12:59:02 +00:00
2021-09-07 21:31:55 +00:00
2021-09-10 16:01:03 +00:00
2021-09-09 21:40:57 +00:00
2021-08-08 14:10:01 +00:00