Fix XML parsing exceptions when revisions with empty log messages are parsed.

This fixes issue 518; Dmitry is added to AUTHORS.
This commit is contained in:
Dmitry Dulepov
2011-03-18 02:33:54 +01:00
committed by Thomas Keller
parent 045eb766f1
commit be39d72d3c
3 changed files with 9 additions and 2 deletions

View File

@@ -266,8 +266,13 @@ class IDF_Scm_Svn extends IDF_Scm
escapeshellarg($this->repo),
escapeshellarg($rev));
$cmd = Pluf::f('idf_exec_cmd_prefix', '').$cmd;
$xml = simplexml_load_string(self::shell_exec('IDF_Scm_Svn::getCommitMessage', $cmd));
$this->cache['commitmess'][$rev] = (string) $xml->logentry->msg;
try {
$xml = simplexml_load_string(self::shell_exec('IDF_Scm_Svn::getCommitMessage', $cmd));
$this->cache['commitmess'][$rev] = (string) $xml->logentry->msg;
}
catch (Exception $e) {
$this->cache['commitmess'][$rev] = '';
}
return $this->cache['commitmess'][$rev];
}