From: Michael J. Rubinsky Date: Sat, 10 Jan 2009 18:33:38 +0000 (-0500) Subject: It's possible that an app won't have an entry in the mime_drivers array X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=a97110877386e3bf867db335b7b3e2862cd512be;p=horde.git It's possible that an app won't have an entry in the mime_drivers array --- diff --git a/framework/Mime/lib/Horde/Mime/Viewer.php b/framework/Mime/lib/Horde/Mime/Viewer.php index dbb153f1d..0b72ab68e 100644 --- a/framework/Mime/lib/Horde/Mime/Viewer.php +++ b/framework/Mime/lib/Horde/Mime/Viewer.php @@ -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 */