From 6bdd9038cfa5a6a427b838effc44d5787b18eb1c Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Thu, 9 Dec 2021 09:10:18 +0000 Subject: [PATCH] * Add error return. --- module/gitlab/model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/gitlab/model.php b/module/gitlab/model.php index bb8d76d3bc..61be513376 100644 --- a/module/gitlab/model.php +++ b/module/gitlab/model.php @@ -2349,6 +2349,7 @@ class gitlabModel extends model $url = sprintf($this->getApiRoot($gitlabID), "/projects/$projectID/protected_branches"); $branches = json_decode(commonModel::http($url)); + if(!is_array($branches)) return $branches; /* Parse order string. */ $order = explode('_', $orderBy);