[patch] Fix `Undefined offset' warning
"Jason M. Felice" <[email protected]>
| Newsgroups | gmane.comp.horde.whups |
|---|---|
| Message-ID | <[email protected]> |
It's pretty self-explanatory. -- Whups mailing list Frequently Asked Questions: http://horde.org/faq/ To unsubscribe, mail: [email protected]
whups-mail-fix.diff
(text/plain, 590 B)
patchwork diff lib/Driver.php
--- lib/Driver.php Thu Dec 4 22:17:02 2003
+++ lib/Driver.php Thu Dec 4 22:18:07 2003
@@ -552,7 +552,7 @@
/* Get our array of comments, sorted in the appropriate order. */
$reverse = ($conf['mail']['commenthistory'] != 'chronological');
$comments = $this->getComments($ticket_id, $reverse);
- if ($conf['mail']['commenthistory'] == 'new') {
+ if ($conf['mail']['commenthistory'] == 'new' && count($comments) > 0) {
$comments = array($comments[0]);
}
} else {