From a774dc5447a1d90cd5c361e9196ab41fd91f92cf Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 19 Jan 2010 22:38:03 -0800 Subject: Don't send headers if they're already sent. --- modules/rest/helpers/rest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules') 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()); + } } /** -- cgit v1.2.3