projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0bd2312
)
throw an exception if an API class doesn't exist, instead of a fatal error
author
Chuck Hagenbuch
<chuck@horde.org>
Mon, 17 Aug 2009 02:27:43 +0000
(22:27 -0400)
committer
Chuck Hagenbuch
<chuck@horde.org>
Mon, 17 Aug 2009 02:27:43 +0000
(22:27 -0400)
framework/Core/lib/Horde/Registry.php
patch
|
blob
|
history
diff --git
a/framework/Core/lib/Horde/Registry.php
b/framework/Core/lib/Horde/Registry.php
index
771c25f
..
b90ad11
100644
(file)
--- a/
framework/Core/lib/Horde/Registry.php
+++ b/
framework/Core/lib/Horde/Registry.php
@@
-384,8
+384,11
@@
class Horde_Registry
$classname = 'Horde_Registry_' . $cname;
}
- $this->_cache['ob'][$app][$type] = new $classname;
+ if (!class_exists($classname, false)) {
+ throw new Horde_Exception("$app does not have an API");
+ }
+ $this->_cache['ob'][$app][$type] = new $classname;
return $this->_cache['ob'][$app][$type];
}