Sergey Biryukov
c11ce53dce
Query: Avoid PHP notices when get_queried_object()
returns null
.
...
`WP_Query` methods assume that `get_queried_object()` would return a non-null value, which is not always the case.
This commit resolves various warnings in `WP_Query` along the lines of:
{{{
Attempt to read property "post_type" on null in wp-includes/class-wp-query.php on line 4338
}}}
Follow-up to [1728], [3639], [8807], [49119].
Props dd32, yellyc, boonebgorges, darkskipper, Howdy_McGee, swissspidy, nacin, mikeschroder, mikejolley, sterlo, datainterlock, utsavmadaan823, kanlukasz, woji29911, hellofromTonya, zikubd, deksar, bwbama, noplanman, nouarah, SergeyBiryukov.
Fixes #29660 .
Built from https://develop.svn.wordpress.org/trunk@54496
git-svn-id: http://core.svn.wordpress.org/trunk@54055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-11 18:15:13 +00:00
..
2022-10-11 15:26:55 +00:00
2022-04-12 09:26:16 +00:00
2022-10-04 16:47:13 +00:00
2022-10-11 16:40:14 +00:00
2021-10-03 17:51:06 +00:00
2022-10-11 15:26:55 +00:00
2022-10-07 20:48:12 +00:00
2022-10-04 02:08:11 +00:00
2021-11-16 00:04:01 +00:00
2022-10-11 17:37:12 +00:00
2022-04-06 15:20:06 +00:00
2022-10-09 17:12:31 +00:00
2022-09-26 20:56:10 +00:00
2022-02-16 21:19:04 +00:00
2021-12-06 21:30:03 +00:00
2022-10-11 13:25:11 +00:00
2021-12-20 19:33:00 +00:00
2022-09-12 15:47:14 +00:00
2022-09-26 14:00:10 +00:00
2022-10-11 15:00:12 +00:00
2022-03-22 16:25:03 +00:00
2022-03-22 16:25:03 +00:00
2022-09-26 22:43:10 +00:00
2022-08-13 22:44:09 +00:00
2022-04-21 11:24:17 +00:00
2022-09-20 16:26:10 +00:00
2022-09-23 14:00:09 +00:00
2021-08-11 09:08:01 +00:00
2022-09-20 16:29:12 +00:00
2022-10-11 17:30:12 +00:00
2022-09-26 22:43:10 +00:00
2022-10-07 15:46:12 +00:00
2022-06-23 22:57:12 +00:00
2022-08-30 15:17:08 +00:00
2022-10-10 18:22:11 +00:00
2022-10-10 18:22:11 +00:00
2022-04-01 03:25:01 +00:00
2022-09-27 16:31:10 +00:00
2022-08-19 23:06:09 +00:00
2022-08-04 14:52:11 +00:00
2022-06-17 11:20:13 +00:00
2022-08-31 13:41:08 +00:00
2022-06-17 11:20:13 +00:00
2021-12-06 21:30:03 +00:00
2021-12-24 18:06:06 +00:00
2022-01-30 19:25:03 +00:00
2022-01-30 19:25:03 +00:00
2022-01-30 19:25:03 +00:00
2022-09-15 12:32:08 +00:00
2022-05-01 22:01:10 +00:00
2022-01-30 19:25:03 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-20 15:43:29 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-19 19:51:09 +00:00
2022-10-03 14:41:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 21:50:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-10-11 09:02:14 +00:00
2022-09-28 22:19:10 +00:00
2022-09-12 15:47:14 +00:00
2022-09-26 22:43:10 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2021-12-06 21:30:03 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-19 22:53:10 +00:00
2022-09-19 22:53:10 +00:00
2022-10-07 19:17:12 +00:00
2022-09-12 15:47:14 +00:00
2022-09-26 22:10:16 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-20 14:26:10 +00:00
2022-09-26 22:10:16 +00:00
2022-09-12 15:47:14 +00:00
2022-10-10 23:11:12 +00:00
2022-09-12 15:47:14 +00:00
2022-09-26 22:10:16 +00:00
2022-09-12 15:47:14 +00:00
2022-10-11 18:15:13 +00:00
2022-10-04 03:59:13 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-10-04 23:01:13 +00:00
2022-09-12 15:47:14 +00:00
2022-09-19 20:49:10 +00:00
2022-09-28 22:19:10 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-28 14:59:10 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-10-11 15:00:12 +00:00
2022-10-11 17:17:13 +00:00
2022-09-12 15:47:14 +00:00
2022-10-07 12:01:13 +00:00
2022-09-20 01:36:09 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-10-11 01:46:14 +00:00
2022-09-20 13:12:10 +00:00
2022-10-04 15:41:18 +00:00
2022-09-20 14:17:12 +00:00
2022-09-20 14:17:12 +00:00
2022-09-20 14:17:12 +00:00
2022-10-11 15:45:11 +00:00
2022-10-11 16:32:13 +00:00
2022-05-08 00:29:14 +00:00
2022-10-11 09:02:14 +00:00
2022-06-17 11:20:13 +00:00
2022-09-20 01:36:09 +00:00
2022-09-29 18:55:10 +00:00
2022-10-11 14:47:11 +00:00
2022-06-17 11:20:13 +00:00
2022-08-19 22:06:09 +00:00
2022-04-29 19:17:11 +00:00
2021-11-29 09:52:00 +00:00
2022-06-20 21:46:16 +00:00
2022-10-11 15:07:10 +00:00
2022-10-11 13:25:11 +00:00
2022-10-11 09:02:14 +00:00
2022-10-11 09:02:14 +00:00
2022-10-11 09:02:14 +00:00
2022-10-07 12:09:11 +00:00
2022-09-14 13:08:14 +00:00
2022-08-11 14:11:08 +00:00
2022-09-15 13:29:13 +00:00
2022-09-28 22:19:10 +00:00
2022-09-13 18:05:09 +00:00
2022-10-10 17:59:12 +00:00
2022-09-20 04:02:10 +00:00
2022-10-07 19:03:11 +00:00
2022-08-11 14:03:09 +00:00
2022-09-06 11:28:13 +00:00
2022-07-14 13:35:13 +00:00
2022-09-20 02:51:09 +00:00
2022-09-21 19:48:13 +00:00
2022-10-11 15:07:10 +00:00
2022-05-13 12:21:13 +00:00
2022-09-06 11:28:13 +00:00
2022-08-26 01:03:14 +00:00
2022-10-11 14:04:13 +00:00
2022-06-15 13:37:10 +00:00
2022-09-28 13:44:15 +00:00
2022-10-06 04:38:14 +00:00
2022-08-01 11:15:14 +00:00
2022-09-21 20:24:12 +00:00
2022-03-15 15:22:05 +00:00
2022-10-04 03:33:10 +00:00
2022-06-21 13:34:13 +00:00
2022-09-28 14:04:11 +00:00
2022-09-28 14:47:12 +00:00
2022-10-01 03:25:10 +00:00
2022-04-06 15:33:03 +00:00
2022-03-22 16:25:03 +00:00
2022-10-11 15:30:11 +00:00
2022-09-26 22:43:10 +00:00
2022-09-14 12:48:16 +00:00
2022-10-10 12:30:16 +00:00
2021-12-10 20:30:05 +00:00
2022-09-21 01:09:10 +00:00
2022-09-21 11:43:13 +00:00
2022-05-02 13:13:08 +00:00
2022-09-14 18:44:09 +00:00
2022-10-07 20:48:12 +00:00
2022-09-22 11:13:14 +00:00
2022-10-11 13:45:13 +00:00
2022-04-27 13:47:11 +00:00
2022-10-11 18:15:13 +00:00
2022-06-01 18:14:10 +00:00
2022-07-21 22:45:11 +00:00