summaryrefslogtreecommitdiffstats
path: root/system/libraries/Xmlrpcs.php
diff options
context:
space:
mode:
authorDaniel Hunsaker <danhunsaker@gmail.com>2013-01-25 01:09:10 +0100
committerDaniel Hunsaker <danhunsaker@gmail.com>2013-01-25 01:09:10 +0100
commit353f9834adf3f44c6c7a0f924089bb2b43360404 (patch)
tree0616270672816be15a7332f6060013ac131e550e /system/libraries/Xmlrpcs.php
parent1a0014941dcf399e97d3586bd6d3382166b413dd (diff)
Updated all cases of exit() to return a valid code
Specific codes are as follows, but can easily be changed if a different order/breakdown makes more sense: - 0: Success; everything executed as planned - 1: Configuration Error; something is wrong with/in the configuration file(s) - 2: Class Not Found; what it says - 3: Driver Method Unsupported; the method you're trying to use on a Driver doesn't exist - 4: File Not Found; 404 error - 5: Database Error; something is broken in the database somewhere - 6: Invalid Input; the user attempted to submit a request with invlaid characters in 1+ key names 7 through 26 are reserved for future use - 27: Generic Error; generated by show_error() when the status code is >= 100 28 through 127 are errors generated by user applications, normally by using show_error() with a status code below 100 128 through 254 should not be used by applications, as they are reserved by system-level functions - 255: PHP Fatal Error; automatically generated by PHP for fatal errors, and therefore not allowed for our use Status codes below 100 are shifted up by 28 to place them in the user error range. It may make more sense to have these codes left alone and instead shift the CI errors into the 101 through 127 space, but that's not what I opted for here. It would probably also be a good idea to replace the hard-coded numbers with constants or some such, but I was in a bit of a hurry when I made these changes, so I didn't look around for the best place to do this. With proper guidance, I could easily amend this commit with another that uses such constant values. Signed-off-by: Daniel Hunsaker <danhunsaker@gmail.com>
Diffstat (limited to 'system/libraries/Xmlrpcs.php')
-rw-r--r--system/libraries/Xmlrpcs.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/system/libraries/Xmlrpcs.php b/system/libraries/Xmlrpcs.php
index d4524d230..465a1967b 100644
--- a/system/libraries/Xmlrpcs.php
+++ b/system/libraries/Xmlrpcs.php
@@ -170,7 +170,8 @@ class CI_Xmlrpcs extends CI_Xmlrpc {
header('Content-Type: text/xml');
header('Content-Length: '.strlen($payload));
- exit($payload);
+ echo $payload;
+ exit(0);
}
// --------------------------------------------------------------------