Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Fix error checking on Zend\Http\Client\Adapter\Socket->write(). #3033

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion library/Zend/Http/Client/Adapter/Socket.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ public function write($method, $uri, $http_ver = '1.1', $headers = array(), $bod
ErrorHandler::start(); ErrorHandler::start();
$test = fwrite($this->socket, $request); $test = fwrite($this->socket, $request);
$error = ErrorHandler::stop(); $error = ErrorHandler::stop();
if (!$test) { if (false === $test) {
throw new AdapterException\RuntimeException('Error writing request to server', 0, $error); throw new AdapterException\RuntimeException('Error writing request to server', 0, $error);
} }


Expand Down