diff --git a/public_html/deployment/classes/project.class.php b/public_html/deployment/classes/project.class.php index 3f2aa08f8876c1c72fc98a638cde91d1d9d7ded0..3b7e633a01d3797f0b2aee8c3db0bc0015e3ee24 100644 --- a/public_html/deployment/classes/project.class.php +++ b/public_html/deployment/classes/project.class.php @@ -1802,13 +1802,21 @@ class project extends base return $this->_oHtml->getBox("error", "" . $sReturn); } - + // read commit message and fetch meta data $aRepodata = $this->getRepoRevision(); - $sRevisionShort = substr($aRepodata['revision'], 0, 8); - $sReturn .= $this->_oHtml->getBox("info", t('commitmessage') . '<pre>' . htmlentities($aRepodata['message']) . '</pre>'); - $sReturn .= $this->_execAndSend("ls -lisa $sTempBuildDir"); + // #7706 check if a branch was detected + if(!isset($aRepodata['branch']) || !$aRepodata['branch']){ + $sError = t('class-project-error-unable-to-read-vcs-metadata'); + $this->_logaction($sError, __FUNCTION__, "error"); + $this->_TempFill($sError . $sReturn, $aActionList); + $this->_TempDelete($sTempBuildDir); + return $this->_oHtml->getBox("error", $sError . $sReturn); + } + $sRevisionShort = substr($aRepodata['revision'], 0, 8); + + $sReturn .= $this->_execAndSend("ls -lisa $sTempBuildDir"); if (!$this->_iRcAll == 0) { $sError = sprintf(t('class-project-error-command-failed'), $sTempBuildDir); $this->_logaction($sError, __FUNCTION__, "error");