mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/11603] Throw RuntimeExceptions instead of using exit()
PHPBB3-11603
This commit is contained in:
parent
1516ae7e7e
commit
99e486dc82
2 changed files with 2 additions and 2 deletions
|
@ -143,7 +143,7 @@ function api_url_request($url)
|
||||||
|
|
||||||
if (isset($contents->message) && strpos($contents->message, 'API Rate Limit') === 0)
|
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;
|
return $contents;
|
||||||
|
|
|
@ -187,7 +187,7 @@ function api_url_request($url)
|
||||||
|
|
||||||
if (isset($contents->message) && strpos($contents->message, 'API Rate Limit') === 0)
|
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;
|
return ($sub_request_result) ? array_merge($sub_request_result, $contents) : $contents;
|
||||||
|
|
Loading…
Add table
Reference in a new issue