Opened 4 years ago
Closed 4 years ago
#8591 closed defect (bug) (invalid)
PHP Error with WP_Error
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | HTTP | Version: | 2.7 |
| Severity: | normal | Keywords: | has-patch developer-feedback |
| Cc: |
Description
I'm getting a white screen on my main WordPress site when I Publish a post since starting to use 2.7.
My server error logs contain the following that matches time wise for every white screen I've seen:
PHP Catchable fatal error: Object of class WP_Error could not be converted to string in /home/prescrib/public_html/wp-includes/comment.php on line 1264
I have disabled all plugins and still get this error. (Strangely, this is not reproducible on my localhost dev WordPress so there may be some server settings involved too.
Attachments (2)
Change History (13)
This might happen when WP_Http_Fsockopen::chunkTransferDecode() fails to decode the response. In this case, $responsebody? becomes WP_Error, not a string:
$process['body'] = WP_Http::chunkTransferDecode($process['body']);
Need to add one extra check to discover_pingback_server_uri().
vladimir_kolesnikov — 4 years ago
- Keywords has-patch added
vladimir_kolesnikov — 4 years ago
- Keywords developer-feedback added
Attached a better patch that takes care of other places from which wp_remote_get()/wp_remote_post() are called.
- Priority changed from highest omg bbq to normal
- Summary changed from White Screen on Publish to PHP Error with WP_Error
I went back to basic and wiped my WordPress install and re-uploaded the core files fresh. This has resolved the white screen issue. Maybe the patch will fix the Error Log entry
comment:9
in reply to:
↑ 8
vladimir_kolesnikov — 4 years ago
Yes, from what I can tell that seems to have fixed the problem.
comment:11
jacobsantos — 4 years ago
- Milestone 2.7.1 deleted
- Resolution set to invalid
- Status changed from new to closed
Addressed upstream in #8618. PHPdoc is also fixed in that ticket for both 2.7 and trunk.

And stranger still, if I amend the function that appear to be generating this error by adding a:
return false;
immediately the function is called I don't get the error in the logs but I still get a white screen!?!