It's possible that an app won't have an entry in the mime_drivers array
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 10 Jan 2009 18:33:38 +0000 (13:33 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 10 Jan 2009 18:34:36 +0000 (13:34 -0500)
framework/Mime/lib/Horde/Mime/Viewer.php

index dbb153f..0b72ab6 100644 (file)
@@ -128,7 +128,6 @@ class Horde_Mime_Viewer
             if (is_a($res, 'PEAR_Error')) {
                 return false;
             }
-
             require_once 'Horde/Array.php';
             self::$_config = Horde_Array::array_merge_recursive_overwrite(self::$_config, $res);
         }
@@ -146,7 +145,7 @@ class Horde_Mime_Viewer
             return self::_getDriver($mime_type, 'horde');
         }
 
-        $dr = self::$_config['mime_drivers'][$app];
+        $dr = isset(self::$_config['mime_drivers'][$app]) ? self::$_config['mime_drivers'][$app] : array();
         $map = self::$_config['mime_drivers_map'][$app];
 
         /* If an override exists for this MIME type, then use that */