summaryrefslogtreecommitdiffstats
path: root/system/libraries
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 /system/libraries
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 'system/libraries')
-rw-r--r--system/libraries/Driver.php2
-rw-r--r--system/libraries/Trackback.php6
2 files changed, 3 insertions, 5 deletions
diff --git a/system/libraries/Driver.php b/system/libraries/Driver.php
index 382420db0..1bc365cbc 100644
--- a/system/libraries/Driver.php
+++ b/system/libraries/Driver.php
@@ -290,7 +290,7 @@ class CI_Driver {
$trace = debug_backtrace();
_exception_handler(E_ERROR, "No such method '{$method}'", $trace[1]['file'], $trace[1]['line']);
- exit;
+ exit(EXIT_UNKNOWN_METHOD);
}
// --------------------------------------------------------------------
diff --git a/system/libraries/Trackback.php b/system/libraries/Trackback.php
index ecc7129e3..5a45be8dd 100644
--- a/system/libraries/Trackback.php
+++ b/system/libraries/Trackback.php
@@ -211,8 +211,7 @@ class CI_Trackback {
*/
public function send_error($message = 'Incomplete Information')
{
- echo '<?xml version="1.0" encoding="utf-8"?'.">\n<response>\n<error>1</error>\n<message>".$message."</message>\n</response>";
- exit;
+ exit('<?xml version="1.0" encoding="utf-8"?'.">\n<response>\n<error>1</error>\n<message>".$message."</message>\n</response>");
}
// --------------------------------------------------------------------
@@ -227,8 +226,7 @@ class CI_Trackback {
*/
public function send_success()
{
- echo '<?xml version="1.0" encoding="utf-8"?'.">\n<response>\n<error>0</error>\n</response>";
- exit;
+ exit('<?xml version="1.0" encoding="utf-8"?'.">\n<response>\n<error>0</error>\n</response>");
}
// --------------------------------------------------------------------