Suppress a notice in case the git log line does not contain

a title (fixes issue 520)
master
Thomas Keller 2010-11-25 00:13:47 +01:00
parent abc8b8f4ab
commit 1548d4184e
1 changed files with 3 additions and 1 deletions

View File

@ -85,6 +85,8 @@ class IDF_Scm_Cache_Git extends Pluf_Model
array($this->_project->id));
foreach (Pluf::factory(__CLASS__)->getList(array('filter' => $sql->gen())) as $blob) {
$tmp = explode(chr(31), $blob->content, 3);
// sometimes the title might be empty
if (!isset($tmp[2])) $tmp[2] = '';
$res[$blob->githash] = (object) array(
'hash' => $blob->githash,
@ -131,4 +133,4 @@ class IDF_Scm_Cache_Git extends Pluf_Model
),
);
}
}
}