]> git.mxchange.org Git - core.git/commitdiff
Check if path can be loadded before attempting it.
authorRoland Haeder <roland@mxchange.org>
Thu, 15 May 2014 19:20:29 +0000 (21:20 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 15 May 2014 19:20:29 +0000 (21:20 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
inc/loader/class_ClassLoader.php

index cc7bb8152237b18ce4b9aae3d8253178455d27bb..eea558055fee071088fdac0eefd59d9f53e3e2a2 100644 (file)
@@ -195,8 +195,14 @@ class ClassLoader {
 
                // Load all classes for the application
                foreach (self::$frameworkPaths as $class) {
-                       // Try to load the application classes
-                       ClassLoader::getSelfInstance()->scanClassPath(sprintf('%s/%s/%s', $cfg->getConfigEntry('application_path'), $cfg->getConfigEntry('app_name'), $class));
+                       // Create path name
+                       $path = sprintf('%s/%s/%s', $cfg->getConfigEntry('application_path'), $cfg->getConfigEntry('app_name'), $class);
+
+                       // Is the path readable?
+                       if (is_dir($path)) {
+                               // Try to load the application classes
+                               ClassLoader::getSelfInstance()->scanClassPath($path);
+                       } // END - if
                } // END - foreach
        }