--- drupalforfirebug.module 2011-01-06 20:26:58.000000000 +0300 +++ drupalforfirebug.module.new 2011-01-28 17:01:30.000000000 +0300 @@ -13,16 +13,18 @@ function drupalforfirebug_init() { function drupalforfirebug_exit() { $dff = TRUE; - // Try not to break non html pages. [from devel.module] - if (function_exists('drupal_get_headers')) { - $headers = drupal_get_headers(); - $formats = array('xml', 'javascript', 'json', 'plain', 'image', 'application', 'csv', 'x-comma-separated-values'); - foreach ($formats as $format) { - if (strstr($headers, $format)) { - $dff = FALSE; + // Try not to break non html pages. [from new devel.module] + if (function_exists('drupal_get_http_header')) { + $header = drupal_get_http_header('content-type'); + if ($header) { + $formats = array('xml', 'javascript', 'json', 'plain', 'image', 'application', 'csv', 'x-comma-separated-values'); + foreach ($formats as $format) { + if (strstr($header, $format)) { + $dff = FALSE; + } + } } - } - } + } // Check with Devel if Installed if (module_exists('devel')) {