mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-17 05:03:28 +00:00
[MIRROR] [webhook] treat github api errors when validating users better. [MDB IGNORE] (#16625)
* [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 * [webhook] treat github api errors when validating users better. Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
This commit is contained in:
@@ -185,7 +185,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