Added extra error check.
It turns out that under some circumstances, the PHP HTTP stream wrapper does not return an error code. Account for this.
This commit is contained in:
@@ -56,6 +56,10 @@ class PHPStreamTransport implements Transporter {
|
||||
// intelligently.
|
||||
if ($res === FALSE) {
|
||||
$err = error_get_last();
|
||||
|
||||
if (empty($err['message'])) {
|
||||
throw new \HPCloud\Exception("An unknown exception occurred while sending a request.");
|
||||
}
|
||||
$this->guessError($err['message']);
|
||||
|
||||
// Should not get here.
|
||||
|
||||
Reference in New Issue
Block a user