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');