]> git.wh0rd.org Git - tt-rss.git/commitdiff
fetch: check if http_response_header is set
authorAndrew Dolgov <fox@fakecake.org>
Wed, 24 Apr 2013 06:45:44 +0000 (10:45 +0400)
committerAndrew Dolgov <fox@fakecake.org>
Wed, 24 Apr 2013 06:45:44 +0000 (10:45 +0400)
include/functions.php

index 8a414aec2efc991d5300af25b85e02b1a62fb113..10a3504f2abcfc7b6f55577cf17cd4a155ce096d 100644 (file)
                        $data = @file_get_contents($url, false, $context);
 
                        $fetch_last_content_type = false;  // reset if no type was sent from server
-                       if (is_array($http_response_header)) {
+                       if (isset($http_response_header) && is_array($http_response_header)) {
                                foreach ($http_response_header as $h) {
                                        if (substr(strtolower($h), 0, 13) == 'content-type:') {
                                                $fetch_last_content_type = substr($h, 14);