mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-19 23:32:02 +02:00
[ticket/11603] Throw RuntimeExceptions instead of using exit()
PHPBB3-11603
This commit is contained in:
parent
1516ae7e7e
commit
99e486dc82
@ -143,7 +143,7 @@ function api_url_request($url)
|
||||
|
||||
if (isset($contents->message) && strpos($contents->message, 'API Rate Limit') === 0)
|
||||
{
|
||||
exit('Reached github API Rate Limit. Please try again later' . "\n");
|
||||
throw new RuntimeException('Reached github API Rate Limit. Please try again later' . "\n", 4);
|
||||
}
|
||||
|
||||
return $contents;
|
||||
|
@ -187,7 +187,7 @@ function api_url_request($url)
|
||||
|
||||
if (isset($contents->message) && strpos($contents->message, 'API Rate Limit') === 0)
|
||||
{
|
||||
exit('Reached github API Rate Limit. Please try again later' . "\n");
|
||||
throw new RuntimeException('Reached github API Rate Limit. Please try again later' . "\n", 4);
|
||||
}
|
||||
|
||||
return ($sub_request_result) ? array_merge($sub_request_result, $contents) : $contents;
|
||||
|
Loading…
x
Reference in New Issue
Block a user