aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-07 01:55:15 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-07 01:55:15 +0000
commita1d3c90fb72cd14f61b1209f9c0a0d3a106c71a8 (patch)
tree87f8f25436e89948846c9c18d90ea380e9b73335 /engine/lib
parenta6936ba9eb19da233de1030e6aa84bbbcebfaa23 (diff)
downloadelgg-a1d3c90fb72cd14f61b1209f9c0a0d3a106c71a8.tar.gz
elgg-a1d3c90fb72cd14f61b1209f9c0a0d3a106c71a8.tar.bz2
Refs #2220. Check that an autoload class is registered before trying to include it.
git-svn-id: http://code.elgg.org/elgg/trunk@7552 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/elgglib.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index e6bbb3c01..e8014f2a2 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -22,7 +22,7 @@ elgg_register_classes(dirname(dirname(__FILE__)) . '/classes');
function _elgg_autoload($class) {
global $CONFIG;
- if (!include($CONFIG->classes[$class])) {
+ if (!isset($CONFIG->classes[$class]) || !include($CONFIG->classes[$class])) {
throw new Exception("Failed to autoload $class");
}
}
@@ -85,7 +85,7 @@ function elgg_register_library($name, $location) {
/**
* Load a php library.
*
- * @param string $name The name of the library
+ * @param string $name The name of the library
*
* @return void
* @throws InvalidParameterException