dmsnell
596e76ed99
REST API: Add missing properties in block node arrays.
...
There have been a few places in WordPress where a method creates “an array representation simulating the output of parse_blocks”, but the array is missing one or more keys.
The missing keys cause issue with downstream code, which either treats a block without, for example, `innerBlocks` as invalid input, or more commonly, assumes that `innerBlocks` is present and accesses it unconditionally. This can even lead to crashes.
This patch adds the missing properties so that the code behaves as expected. Since the array values are empty by default, adding these missing keys does not present any intentional behavioral changes — only a safer default.
Developed in: https://github.com/WordPress/wordpress-develop/pull/10735
Discussed in: https://core.trac.wordpress.org/ticket/64505
Follow-up to [47360], [57354].
Props dlh, dmsnell, mukesh27, westonruter.
Fixes #64505 .
Built from https://develop.svn.wordpress.org/trunk@62039
git-svn-id: http://core.svn.wordpress.org/trunk@61321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-03-17 16:50:47 +00:00
..
2026-02-09 17:00:43 +00:00
2026-03-17 14:30:39 +00:00
2026-03-12 13:58:51 +00:00
2025-10-17 17:39:30 +00:00
2026-02-10 16:37:40 +00:00
2026-03-11 06:20:49 +00:00
2026-03-12 13:58:51 +00:00
2026-03-12 13:58:51 +00:00
2026-02-19 11:53:48 +00:00
2026-03-05 09:24:36 +00:00
2026-03-12 13:58:51 +00:00
2026-02-27 23:18:40 +00:00
2025-12-30 13:03:34 +00:00
2026-03-11 06:20:49 +00:00
2026-03-05 11:58:29 +00:00
2026-03-10 12:52:40 +00:00
2026-03-10 12:42:42 +00:00
2026-02-21 04:41:44 +00:00
2026-03-12 13:58:51 +00:00
2026-02-17 23:01:43 +00:00
2026-03-11 15:46:35 +00:00
2026-01-10 23:52:47 +00:00
2026-01-06 05:57:56 +00:00
2026-02-27 23:36:42 +00:00
2026-03-17 16:50:47 +00:00
2025-10-16 19:45:36 +00:00
2024-11-26 21:17:25 +00:00
2025-12-30 22:55:37 +00:00
2026-02-20 02:25:46 +00:00
2025-09-17 14:44:24 +00:00
2025-12-26 13:16:34 +00:00
2026-02-15 23:18:43 +00:00
2026-02-09 17:00:43 +00:00
2026-02-19 10:57:01 +00:00
2026-03-14 07:54:49 +00:00
2026-02-20 08:42:48 +00:00
2025-09-03 12:18:31 +00:00
2026-03-03 07:18:43 +00:00
2025-10-20 08:52:24 +00:00
2026-03-12 23:24:40 +00:00
2026-02-10 16:37:40 +00:00
2026-02-25 15:27:46 +00:00
2026-01-11 06:36:49 +00:00
2026-03-17 16:50:47 +00:00
2025-03-19 23:15:35 +00:00
2026-03-14 19:23:49 +00:00
2025-04-29 22:44:37 +00:00
2025-11-04 18:31:29 +00:00
2026-01-06 05:57:56 +00:00
2026-03-12 23:25:20 +00:00
2026-02-23 05:34:45 +00:00
2026-03-14 23:55:49 +00:00
2024-09-30 22:50:19 +00:00
2025-01-22 19:48:25 +00:00
2025-08-25 13:10:29 +00:00
2024-10-25 20:26:20 +00:00
2024-09-30 22:50:19 +00:00
2025-01-21 21:26:23 +00:00
2026-03-12 23:26:41 +00:00
2025-04-03 13:53:28 +00:00
2026-02-14 00:37:41 +00:00
2025-09-28 21:56:27 +00:00
2025-08-07 14:47:34 +00:00
2026-01-05 05:24:33 +00:00
2025-10-21 07:14:02 +00:00
2026-03-10 11:29:34 +00:00
2026-03-12 23:25:20 +00:00
2025-12-03 19:47:33 +00:00
2026-03-10 21:11:48 +00:00
2026-01-22 01:12:36 +00:00
2026-01-11 06:50:42 +00:00
2025-03-04 13:06:27 +00:00
2024-09-20 02:07:12 +00:00
2026-01-05 05:24:33 +00:00
2025-09-29 16:29:35 +00:00
2026-01-05 05:24:33 +00:00
2026-01-05 05:24:33 +00:00
2026-01-05 05:24:33 +00:00
2025-12-22 23:14:38 +00:00
2026-03-03 05:54:45 +00:00
2026-03-16 08:32:25 +00:00
2025-09-07 02:47:36 +00:00
2026-02-27 23:18:40 +00:00
2026-01-05 05:41:32 +00:00
2025-01-22 19:48:25 +00:00
2024-10-13 19:09:12 +00:00
2026-02-27 23:18:40 +00:00
2026-03-11 21:01:46 +00:00
2026-02-24 06:33:36 +00:00
2026-01-28 01:07:42 +00:00
2025-12-07 04:16:33 +00:00
2026-03-02 09:11:52 +00:00
2026-01-05 16:04:58 +00:00
2026-01-05 16:04:58 +00:00
2024-09-27 19:28:14 +00:00
2024-10-22 10:16:16 +00:00
2025-07-30 23:03:30 +00:00
2024-09-30 22:50:19 +00:00
2026-01-09 04:28:52 +00:00
2026-01-05 05:58:26 +00:00
2025-09-03 12:18:31 +00:00
2026-03-10 12:24:47 +00:00
2026-01-30 12:52:40 +00:00
2026-01-10 05:03:50 +00:00
2026-02-20 12:53:37 +00:00
2026-02-26 12:16:42 +00:00
2025-09-03 12:18:31 +00:00
2025-08-26 21:05:30 +00:00
2025-12-16 20:21:37 +00:00
2025-05-11 17:16:30 +00:00
2026-02-13 17:52:44 +00:00
2026-01-06 06:08:03 +00:00
2025-10-21 15:59:33 +00:00
2025-06-18 20:39:52 +00:00
2025-12-22 23:14:38 +00:00
2025-04-04 22:00:27 +00:00
2026-03-03 17:12:44 +00:00
2026-01-06 05:36:58 +00:00
2025-10-01 13:23:28 +00:00
2026-01-11 06:50:42 +00:00
2026-01-28 20:55:41 +00:00
2026-03-03 05:54:45 +00:00
2026-03-10 11:43:18 +00:00
2026-01-07 16:48:03 +00:00
2026-03-01 23:04:45 +00:00
2026-03-01 23:04:45 +00:00
2025-02-23 11:11:21 +00:00
2025-11-25 02:00:36 +00:00
2025-12-23 21:20:31 +00:00
2026-02-04 01:42:44 +00:00
2026-03-11 01:32:44 +00:00
2025-02-11 11:14:21 +00:00
2025-09-16 22:47:31 +00:00
2025-01-22 19:48:25 +00:00
2025-12-22 23:14:38 +00:00
2026-03-03 05:54:45 +00:00
2025-11-23 05:08:29 +00:00
2026-03-11 01:32:44 +00:00
2025-06-16 17:08:31 +00:00
2025-03-26 21:42:27 +00:00
2025-12-22 23:14:38 +00:00
2026-03-03 05:54:45 +00:00
2026-03-10 11:43:18 +00:00
2024-11-20 02:50:24 +00:00
2026-02-13 17:52:44 +00:00
2026-02-20 02:25:46 +00:00
2026-02-18 16:47:42 +00:00
2025-02-18 22:32:22 +00:00
2026-01-11 06:50:42 +00:00
2026-01-11 06:50:42 +00:00
2025-02-17 11:24:21 +00:00
2026-03-03 05:54:45 +00:00
2026-03-12 23:25:20 +00:00
2026-01-10 05:29:48 +00:00
2026-01-06 06:08:03 +00:00
2025-12-03 20:54:33 +00:00
2026-03-12 13:14:41 +00:00
2026-02-15 23:18:43 +00:00
2026-03-10 11:43:18 +00:00
2025-10-21 14:03:27 +00:00
2026-01-09 11:47:48 +00:00
2026-03-16 08:32:25 +00:00
2026-02-13 20:26:40 +00:00
2024-09-30 23:58:16 +00:00
2026-03-14 07:54:49 +00:00
2025-01-22 19:48:25 +00:00
2026-03-12 23:24:40 +00:00
2026-02-15 23:18:43 +00:00
2026-01-06 05:36:58 +00:00
2025-01-22 19:48:25 +00:00
2026-01-28 22:43:42 +00:00
2026-02-12 10:49:41 +00:00
2026-03-06 18:02:45 +00:00
2026-03-12 23:25:20 +00:00
2026-02-04 01:42:44 +00:00
2025-12-22 20:45:31 +00:00
2026-03-17 01:34:47 +00:00
2026-02-10 15:20:51 +00:00
2026-01-11 06:50:42 +00:00
2025-02-24 13:43:23 +00:00
2026-03-10 12:28:40 +00:00
2026-02-13 17:52:44 +00:00
2026-03-16 21:55:49 +00:00
2026-02-28 19:59:46 +00:00
2026-02-27 19:15:49 +00:00
2026-03-11 23:39:48 +00:00
2026-02-03 19:31:46 +00:00
2026-03-12 23:25:20 +00:00
2026-03-12 23:25:20 +00:00
2025-10-17 17:14:32 +00:00
2025-10-27 16:35:36 +00:00
2026-03-10 11:43:18 +00:00
2025-08-27 13:42:30 +00:00
2026-02-11 22:11:45 +00:00
2025-01-22 19:48:25 +00:00
2026-03-10 12:34:44 +00:00
2026-03-07 18:05:33 +00:00
2025-02-03 19:52:24 +00:00
2026-03-15 22:51:41 +00:00
2025-11-03 23:47:33 +00:00
2026-01-10 05:29:48 +00:00
2026-02-15 23:18:43 +00:00
2024-12-20 23:35:23 +00:00
2026-03-05 00:29:38 +00:00
2025-08-31 21:43:30 +00:00
2026-03-05 00:29:38 +00:00
2026-01-06 06:08:03 +00:00
2026-01-06 05:57:56 +00:00
2025-09-03 12:18:31 +00:00
2026-03-12 05:45:46 +00:00
2026-03-03 13:46:42 +00:00
2026-01-05 06:04:33 +00:00
2025-08-27 10:34:28 +00:00
2026-03-03 05:54:45 +00:00
2026-03-10 21:11:48 +00:00
2026-02-20 02:25:46 +00:00
2026-01-05 12:16:10 +00:00
2026-01-05 16:04:58 +00:00
2026-01-11 06:36:49 +00:00
2026-03-09 18:43:38 +00:00
2026-03-03 12:26:46 +00:00
2026-01-09 02:48:51 +00:00
2026-02-25 16:29:45 +00:00
2025-10-21 02:35:31 +00:00
2026-02-07 06:06:43 +00:00
2026-03-17 16:50:47 +00:00
2026-01-19 16:58:45 +00:00
2026-03-11 21:01:46 +00:00
2025-01-22 19:48:25 +00:00