summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorGreg Aker <greg@gregaker.net>2012-02-06 01:40:03 +0100
committerGreg Aker <greg@gregaker.net>2012-02-06 01:40:03 +0100
commit082a383a26f0f36685c6b5bdddc44f10eceafcb8 (patch)
tree02ad420bf5ec25e6e3379e1f821e4e029b00f828 /system
parentb211adee89f5fd2192051e9c0826146bd150f469 (diff)
parentd63e40138e675df40f3a17e04972e82e7a748307 (diff)
Merge pull request #1016 from kevincupp/develop
Adding in a few 503 status codes for common errors
Diffstat (limited to 'system')
-rw-r--r--system/core/Common.php3
-rwxr-xr-xsystem/core/Input.php1
2 files changed, 4 insertions, 0 deletions
diff --git a/system/core/Common.php b/system/core/Common.php
index 2f9c4ff43..225227d17 100644
--- a/system/core/Common.php
+++ b/system/core/Common.php
@@ -177,6 +177,7 @@ if ( ! function_exists('load_class'))
{
// Note: We use exit() rather then show_error() in order to avoid a
// self-referencing loop with the Excptions class
+ set_status_header(503);
exit('Unable to locate the specified class: '.$class.'.php');
}
@@ -243,6 +244,7 @@ if ( ! function_exists('get_config'))
// Fetch the config file
if ( ! file_exists($file_path))
{
+ set_status_header(503);
exit('The configuration file does not exist.');
}
@@ -251,6 +253,7 @@ if ( ! function_exists('get_config'))
// Does the $config array exist in the file?
if ( ! isset($config) OR ! is_array($config))
{
+ set_status_header(503);
exit('Your config file does not appear to be formatted correctly.');
}
diff --git a/system/core/Input.php b/system/core/Input.php
index 7a16e51ab..3339d97c5 100755
--- a/system/core/Input.php
+++ b/system/core/Input.php
@@ -592,6 +592,7 @@ class CI_Input {
{
if ( ! preg_match('/^[a-z0-9:_\/-]+$/i', $str))
{
+ set_status_header(503);
exit('Disallowed Key Characters.');
}