Commit 6a568e8
committed
Code Modernization: Fix
While the error data is normally an array, this is not guaranteed. This issue would have been detected by PHPStan rule level 9, since `WP_Error::get_all_error_data()` returns `mixed[]`.
Developed in #11307
Follow-up to r61429.
Props nateallen, desrosj, jorbin, mukesh27, westonruter.
See #63430.
Fixes #64901.
git-svn-id: https://develop.svn.wordpress.org/trunk@62107 602fd350-edb4-49c9-b593-d223f7449a82rest_convert_error_to_response() handling of non-array error data when obtaining status.1 parent ad285ee commit 6a568e8
File tree
2 files changed
+36
-2
lines changed- src/wp-includes
- tests/phpunit/tests/rest-api
2 files changed
+36
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3427 | 3427 | | |
3428 | 3428 | | |
3429 | 3429 | | |
3430 | | - | |
3431 | | - | |
| 3430 | + | |
| 3431 | + | |
| 3432 | + | |
| 3433 | + | |
| 3434 | + | |
| 3435 | + | |
| 3436 | + | |
| 3437 | + | |
| 3438 | + | |
3432 | 3439 | | |
3433 | 3440 | | |
3434 | 3441 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
592 | 592 | | |
593 | 593 | | |
594 | 594 | | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
595 | 622 | | |
596 | 623 | | |
597 | 624 | | |
| |||
0 commit comments