summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2013-03-04 13:59:53 +0100
committerAndrey Andreev <narf@bofh.bg>2013-03-04 13:59:53 +0100
commitbb5cf0a51ce1aecf1dc5ebeb38336f59388321ef (patch)
tree81696844dd60466d1f1a1c0a4d8bbeb82f9a8b1c /index.php
parentfa01ae4b3a2ed51a93590527c04295eb8cba4e40 (diff)
parent8626e93d5b4362c86a58933dda9206ac8810476d (diff)
Merge pull request #2190 from danhunsaker/feature/exit-status
Updated all CLI-valid cases of exit() to return a valid code
Diffstat (limited to 'index.php')
-rwxr-xr-xindex.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/index.php b/index.php
index be0945740..c6314da1f 100755
--- a/index.php
+++ b/index.php
@@ -67,7 +67,8 @@ switch (ENVIRONMENT)
default:
header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
- exit('The application environment is not set correctly.');
+ echo 'The application environment is not set correctly.';
+ exit(1); // EXIT_* constants not yet defined; 1 is EXIT_ERROR, a generic error.
}
/*
@@ -190,7 +191,8 @@ switch (ENVIRONMENT)
if ( ! is_dir($system_path))
{
header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
- exit('Your system folder path does not appear to be set correctly. Please open the following file and correct this: '.pathinfo(__FILE__, PATHINFO_BASENAME));
+ echo 'Your system folder path does not appear to be set correctly. Please open the following file and correct this: '.pathinfo(__FILE__, PATHINFO_BASENAME);
+ exit(3); // EXIT_* constants not yet defined; 3 is EXIT_CONFIG.
}
/*
@@ -225,7 +227,8 @@ switch (ENVIRONMENT)
if ( ! is_dir(BASEPATH.$application_folder.'/'))
{
header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
- exit('Your application folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF);
+ echo 'Your application folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF;
+ exit(3); // EXIT_* constants not yet defined; 3 is EXIT_CONFIG.
}
define('APPPATH', BASEPATH.$application_folder.'/');
@@ -241,7 +244,8 @@ switch (ENVIRONMENT)
elseif ( ! is_dir(APPPATH.'views/'))
{
header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
- exit('Your view folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF);
+ echo 'Your view folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF;
+ exit(3); // EXIT_* constants not yet defined; 3 is EXIT_CONFIG.
}
else
{