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

This fixes issue 518; Dmitry is added to AUTHORS.
release-1.1
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

@ -7,6 +7,7 @@ Much appreciated contributors (in alphabetical order):
Ludovic Bellière
bohwaz <http://bohwaz.net/>
Adrien Bustany
Dmitry Dulepov
Baptiste Durand-Bret
Manuel Eidenberger <eidenberger@gmail.com>
Raphaël Emourgeon

View File

@ -37,6 +37,7 @@
- Add more file extensions supported by our in-tree prettify version (issues 490 and 567)
- Do not clean `<ins>` and `<del>` HTML markup from user input (issue 509)
- Improve HTML validation by switching from `strict` to `transitional` DOCTYPE (issue 511)
- Ignore XML parsing problems when trying to retrieve commit messages for svn (issue 518)
- Properly handle git commits without a changelog title (issue 520)
- Improve BSD compatibility in shell scripts (issue 526)
- Properly render inner whitespaces in viewed issue attachments (issue 528)

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];
}