mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-09 07:08:03 +01:00
[webhook] treat github api errors when validating users better. (#70219)
Proper fix is to make apisend handle retrying but i can't pr that from in bed when i remember i forgot to look into this so here we are
This commit is contained in:
committed by
GitHub
parent
9ab417fd58
commit
23a58ba321
@@ -186,7 +186,7 @@ function validate_user($payload) {
|
||||
$querystring .= ($querystring == '' ? '' : '+') . urlencode($key) . ':' . urlencode($value);
|
||||
$res = github_apisend('https://api.github.com/search/issues?q='.$querystring);
|
||||
$res = json_decode($res, TRUE);
|
||||
return $res['total_count'] >= (int)$validation_count;
|
||||
return (isset($res['total_count']) && $res['total_count'] >= (int)$validation_count);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user