[whups] [patch] Fix `Undefined offset' warning

Jason M. Felice jfelice at cronosys.com
Thu Dec 4 19:25:07 PST 2003


It's pretty self-explanatory.

-------------- next part --------------
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 {


More information about the whups mailing list