]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Refs #2220. Check that an autoload class is registered before trying to include it.
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 7 Dec 2010 01:55:15 +0000 (01:55 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 7 Dec 2010 01:55:15 +0000 (01:55 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7552 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/elgglib.php

index e6bbb3c013bf682595c938581d69079d81dbc0d5..e8014f2a2ab054e29bf84bf816f02a5992127268 100644 (file)
@@ -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