From 0f49c232f369249e718d7de3074a31148fe07cf0 Mon Sep 17 00:00:00 2001 From: liyuchun Date: Fri, 17 Dec 2021 11:12:05 +0800 Subject: [PATCH] * Fix bug #17640. --- lib/scm/gitlab.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/scm/gitlab.class.php b/lib/scm/gitlab.class.php index 6a4fe815c8..2ac9958d55 100644 --- a/lib/scm/gitlab.class.php +++ b/lib/scm/gitlab.class.php @@ -593,6 +593,7 @@ class gitlab public function getCommittedDate($sha) { if(!scm::checkRevision($sha)) return null; + if(!$sha or $sha == 'HEAD') return date('c'); global $dao; $time = $dao->select('time')->from(TABLE_REPOHISTORY)->where('revision')->eq($sha)->fetch('time');