Commit a931a3f
committed
fix(rest-api): handle null in prepare_items_query()
Use null coalescing to default to an empty array
instead of wrapping the loop in an is_array() check
in WP_REST_Posts_Controller and
WP_REST_Revisions_Controller.1 parent fdafcd3 commit a931a3f
2 files changed
Lines changed: 4 additions & 2 deletions
File tree
- src/wp-includes/rest-api/endpoints
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1210 | 1210 | | |
1211 | 1211 | | |
1212 | 1212 | | |
1213 | | - | |
| 1213 | + | |
| 1214 | + | |
1214 | 1215 | | |
1215 | 1216 | | |
1216 | 1217 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
548 | 548 | | |
549 | 549 | | |
550 | 550 | | |
551 | | - | |
| 551 | + | |
| 552 | + | |
552 | 553 | | |
553 | 554 | | |
554 | 555 | | |
| |||
0 commit comments