Repository navigation
Commit a869515
authored
Suppress PHP warnings when pre-fetching WordPress updates (#2458)
#2295 added
pre-fetching of all the api.wp.org/update-check requests in Playground
Web. Unfortunately, it also generates some noise in the output:
```
[04-Aug-2025 17:10:25 UTC] PHP Warning: wp_update_plugins(): An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/forums/">support forums</a>. (WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.) in /wordpress/wp-includes/functions.php on line 135
[04-Aug-2025 17:10:25 UTC] PHP Warning: wp_update_themes(): An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/forums/">support forums</a>. (WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.) in /wordpress/wp-includes/functions.php on line 135
[04-Aug-2025 17:10:25 UTC] PHP Warning: wp_version_check(): An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/forums/">support forums</a>. (WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.) in /wordpress/wp-includes/functions.php on line 135
```
This PR suppresses those warnings without suppressing other errors.
cc @draganescu
## Testing instructions
1. Go to http://127.0.0.1:5400/website-server/?php=8.0
2. Confirm the warnings mentioned above are not present in the browser
devtools1 parent 1cee011 commit a869515
1 file changed
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
220 | 239 | | |
221 | 240 | | |
222 | 241 | | |
| |||
0 commit comments