diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-01-19 22:38:03 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-01-19 22:38:03 -0800 |
commit | a774dc5447a1d90cd5c361e9196ab41fd91f92cf (patch) | |
tree | 302ef6157f89d7b64a34fc36a4f34f642c0ad5a1 /modules | |
parent | fc4250f5d899dadcfd0dfce6076e66cfaff68941 (diff) |
Don't send headers if they're already sent.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/rest/helpers/rest.php | 4 |
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()); + } } /** |