From: Jan Schneider Date: Tue, 4 Aug 2009 21:24:31 +0000 (+0200) Subject: Don't silence include_once, and allow Api.php to not exist. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=c1af6f5d6136caecbdefc70d588faedbdfd18a63;p=horde.git Don't silence include_once, and allow Api.php to not exist. --- diff --git a/framework/Core/lib/Horde/Registry.php b/framework/Core/lib/Horde/Registry.php index 3738ec87d..bc4b6bdd7 100644 --- a/framework/Core/lib/Horde/Registry.php +++ b/framework/Core/lib/Horde/Registry.php @@ -408,8 +408,11 @@ class Horde_Registry /* Can't autoload here, since the application may not have been * initialized yet. */ $classname = Horde_String::ucfirst($app) . '_Api'; - if (!@include_once $this->get('fileroot', $app) . '/lib/Api.php') { - throw new Horde_Exception('Application ' . $app . ' is missing its API file.'); + $path = $this->get('fileroot', $app) . '/lib/Api.php'; + if (file_exists($path)) { + include_once $path; + } else { + $classname = 'Horde_Registry_Api'; } $this->_cache['apiob'][$app] = new $classname;