summaryrefslogtreecommitdiff
path: root/modules/rest/helpers/rest.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-01-19 22:38:03 -0800
committerBharat Mediratta <bharat@menalto.com>2010-01-19 22:38:03 -0800
commita774dc5447a1d90cd5c361e9196ab41fd91f92cf (patch)
tree302ef6157f89d7b64a34fc36a4f34f642c0ad5a1 /modules/rest/helpers/rest.php
parentfc4250f5d899dadcfd0dfce6076e66cfaff68941 (diff)
Don't send headers if they're already sent.
Diffstat (limited to 'modules/rest/helpers/rest.php')
-rw-r--r--modules/rest/helpers/rest.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/rest/helpers/rest.php b/modules/rest/helpers/rest.php
index 27bafabd..76ecef23 100644
--- a/modules/rest/helpers/rest.php
+++ b/modules/rest/helpers/rest.php
@@ -50,7 +50,9 @@ class rest_Core {
}
static function send_headers($exception) {
- header("HTTP/1.1 " . $exception->getCode() . " " . $exception->getMessage());
+ if (!headers_sent()) {
+ header("HTTP/1.1 " . $exception->getCode() . " " . $exception->getMessage());
+ }
}
/**