diff --git includes/bootstrap.inc includes/bootstrap.inc index 8b463b6..e4e95ef 100644 --- includes/bootstrap.inc +++ includes/bootstrap.inc @@ -917,6 +917,9 @@ function drupal_add_http_header($name = NULL, $value = NULL, $append = FALSE) { // The headers as name/value pairs. $headers = &drupal_static(__FUNCTION__, array()); + if (isset($value) && empty($name)) { + throw new Exception('In Drupal 7, headers are passed in as key:value pairs. For example: $headers = array("Content-type" => "application/octet-stream").'); + } if (!isset($name)) { return $headers; }