mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Internet: only catch InternetExceptions - anything else is an unexpected fault condition
This commit is contained in:
@ -86,7 +86,7 @@ class Internet{
|
||||
try{
|
||||
list($ret, $headers, $httpCode) = self::simpleCurl($page, $timeout, $extraHeaders);
|
||||
return $ret;
|
||||
}catch(\RuntimeException $ex){
|
||||
}catch(InternetException $ex){
|
||||
$err = $ex->getMessage();
|
||||
return false;
|
||||
}
|
||||
@ -113,7 +113,7 @@ class Internet{
|
||||
CURLOPT_POSTFIELDS => $args
|
||||
]);
|
||||
return $ret;
|
||||
}catch(\RuntimeException $ex){
|
||||
}catch(InternetException $ex){
|
||||
$err = $ex->getMessage();
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user