[dev] PATCH: Turba browse error

Jason M. Felice jfelice at cronosys.com
Thu Jul 17 08:24:00 PDT 2003


Searching isn't working on HEAD for me.  I don't really need it right now,
and I figure someone else is working on it (a Someone Else's Problem field
<g>), but the attached patch at least catches and displays the error
gracefully.

FYI, for whoever is working on it, the core of the problems seems to be
that $_SESSION['turba_search_results'] is unset.

-- 
 Jason M. Felice
 Cronosys, LLC <http://www.cronosys.com/>
 216.221.4600 x302
-------------- next part --------------
Index: turba/browse.php
===================================================================
RCS file: /repository/turba/browse.php,v
retrieving revision 1.37
diff -u -u -r1.37 browse.php
--- turba/browse.php	4 Jul 2003 18:06:11 -0000	1.37
+++ turba/browse.php	17 Jul 2003 15:17:53 -0000
@@ -189,7 +189,7 @@
     } elseif (Horde::getFormData('key')) {
         /* We are displaying the contents of a list */
         $list = $driver->getObject(Horde::getFormData('key'));
-        if (isset($list) && is_object($list) && $list->isGroup()) {
+        if (isset($list) && is_object($list) && !is_a($list,'PEAR_Error') && $list->isGroup()) {
             $title = sprintf(_("Addresses in list: %s"), $list->getValue('name'));
             $templates[] = '/browse/header.inc';
             /* Show List Members */
@@ -244,7 +244,7 @@
     require TURBA_TEMPLATES . $template;
 }
 
-if (is_object($display)) {
+if (isset($display) && is_object($display)) {
     $numDisplayed = $display->display();
     require TURBA_TEMPLATES . '/browse/column_footers.inc';
 }


More information about the dev mailing list