Skip to content

Commit

Permalink
Throw ErrorException on socket error regardless of error_reporting level
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanDotPro committed Sep 18, 2012
1 parent 0a337d0 commit 9d534b3
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Sslurp/MozillaCertData.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,7 @@ protected function fetchLatestCertData($until = false)
$ctx = $this->getStreamContext();

set_error_handler(function ($code, $message, $filename, $lineno, $context) {
if ($error_reporting() & $level) {
throw new \ErrorException(sprintf('%s: %s in %s line %d', $code, $message, $filename, $lineno), $code, 0, $filename, $lineno);
}

return false;
throw new \ErrorException(sprintf('%s: %s in %s line %d', $code, $message, $filename, $lineno), $code, 0, $filename, $lineno);
});

try {
Expand Down

0 comments on commit 9d534b3

Please sign in to comment.