From 1548d4184ee458e135a28c3a2803923e7ddf69b2 Mon Sep 17 00:00:00 2001 From: Thomas Keller Date: Thu, 25 Nov 2010 00:13:47 +0100 Subject: [PATCH] Suppress a notice in case the git log line does not contain a title (fixes issue 520) --- src/IDF/Scm/Cache/Git.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/IDF/Scm/Cache/Git.php b/src/IDF/Scm/Cache/Git.php index 4e9fe7e..dc905d4 100644 --- a/src/IDF/Scm/Cache/Git.php +++ b/src/IDF/Scm/Cache/Git.php @@ -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 ), ); } -} \ No newline at end of file +}