summaryrefslogtreecommitdiff
path: root/modules/rest/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'modules/rest/helpers')
-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());
+ }
}
/**