summaryrefslogtreecommitdiff
path: root/include/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-04-24 10:45:44 +0400
committerAndrew Dolgov <[email protected]>2013-04-24 10:45:44 +0400
commit37ddf5b7e76114239085badfc0b1e5f94ca32480 (patch)
tree055510a517cda16b530f1ddb9ab797e1055e8f20 /include/functions.php
parent48c1d0c71bf81c1958baf6ed8d9169f5462d2e24 (diff)
fetch: check if http_response_header is set
Diffstat (limited to 'include/functions.php')
-rw-r--r--include/functions.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/functions.php b/include/functions.php
index 8a414aec2..10a3504f2 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -407,7 +407,7 @@
$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);