Commit 9338be8
fix: add null coalescing check for context param in Gutenberg.php
Add null coalescing operator to check for context parameter existence
before accessing it in extend_post_content method. This prevents PHP 8+
"Undefined array key" warnings that corrupt JSON responses when the
context query parameter is not explicitly provided in REST API requests.
Fixes #940
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 335f73b commit 9338be8
2 files changed
Lines changed: 6 additions & 1 deletion
File tree
- .changeset
- wp/headless-wp/includes/classes/Integrations
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
0 commit comments