Commit 2b063ba
committed
REST API: Protect against fatal error for post types without format support.
Ignore the `format` parameter introduced in WordPress 6.7 for post types that do not support post formats. This protects against a fatal error being thrown in later version of PHP or a warning in earlier versions of PHP.
Follow up to r59115.
Reviewed by jorbin.
Merges [59544] to the 6.7 branch.
Props dd32, sergeybiryukov, yogeshbhutkar.
Fixes #62646.
See #62014.
git-svn-id: https://develop.svn.wordpress.org/branches/6.7@59744 602fd350-edb4-49c9-b593-d223f7449a821 parent 6711402 commit 2b063ba
File tree
2 files changed
+40
-1
lines changed- src/wp-includes/rest-api/endpoints
- tests/phpunit/tests/rest-api
2 files changed
+40
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
349 | | - | |
| 349 | + | |
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5507 | 5507 | | |
5508 | 5508 | | |
5509 | 5509 | | |
| 5510 | + | |
| 5511 | + | |
| 5512 | + | |
| 5513 | + | |
| 5514 | + | |
| 5515 | + | |
| 5516 | + | |
| 5517 | + | |
| 5518 | + | |
| 5519 | + | |
| 5520 | + | |
| 5521 | + | |
| 5522 | + | |
| 5523 | + | |
| 5524 | + | |
| 5525 | + | |
| 5526 | + | |
| 5527 | + | |
| 5528 | + | |
| 5529 | + | |
| 5530 | + | |
| 5531 | + | |
| 5532 | + | |
| 5533 | + | |
| 5534 | + | |
| 5535 | + | |
| 5536 | + | |
| 5537 | + | |
| 5538 | + | |
| 5539 | + | |
| 5540 | + | |
| 5541 | + | |
| 5542 | + | |
| 5543 | + | |
| 5544 | + | |
| 5545 | + | |
| 5546 | + | |
| 5547 | + | |
| 5548 | + | |
5510 | 5549 | | |
5511 | 5550 | | |
5512 | 5551 | | |
| |||
0 commit comments