Double->single converted, framework will abort if application is not found
authorRoland Häder <roland@mxchange.org>
Thu, 23 Jul 2009 19:30:49 +0000 (19:30 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 23 Jul 2009 19:30:49 +0000 (19:30 +0000)
inc/includes.php
inc/selector.php

index 45d08ba..107fbed 100644 (file)
@@ -61,13 +61,9 @@ $application = preg_replace('/([^a-z0-9_-])+/i', '', $application);
 // Set the application name for later usage
 FrameworkConfiguration::getInstance()->setConfigEntry('app_name', $application);
 
 // Set the application name for later usage
 FrameworkConfiguration::getInstance()->setConfigEntry('app_name', $application);
 
-/**
- * Is the devel package included?
- */
-if (is_dir(FrameworkConfiguration::getInstance()->readConfig('base_path') . "devel")) {
-       /**
-        * Load all development includes
-        */
+// Is the devel package included?
+if (is_dir(FrameworkConfiguration::getInstance()->readConfig('base_path') . 'devel')) {
+       // Load all development includes
        ClassLoader::getInstance()->scanClassPath('devel');
 } // END - if
 
        ClassLoader::getInstance()->scanClassPath('devel');
 } // END - if
 
index 0fc66ea..05b2379 100644 (file)
@@ -37,6 +37,12 @@ $configAppIncludes = array(
 // Cache base path/file here
 $basePathFile = FrameworkConfiguration::getInstance()->readConfig('application_path') . FrameworkConfiguration::getInstance()->readConfig('app_name');
 
 // Cache base path/file here
 $basePathFile = FrameworkConfiguration::getInstance()->readConfig('application_path') . FrameworkConfiguration::getInstance()->readConfig('app_name');
 
+// Is the directory there?
+if (!is_dir($basePathFile)) {
+       // Not found.
+       trigger_error('Application ' . FrameworkConfiguration::getInstance()->readConfig('app_name') . ' not found.');
+} // END - if
+
 // Load them all (try only)
 foreach ($configAppIncludes as $appInc) {
        // Skip starter in test mode
 // Load them all (try only)
 foreach ($configAppIncludes as $appInc) {
        // Skip starter in test mode