Skip to content
This repository has been archived by the owner on Mar 15, 2020. It is now read-only.

Commit

Permalink
Check existence of $http_response_headers before setting
Browse files Browse the repository at this point in the history
Fixes an error when using on file ops
  • Loading branch information
padraic committed Apr 22, 2015
1 parent d7851d4 commit 6679719
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/function.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ function humbug_get_contents($filename, $use_include_path = false, $context = nu
$context = FileGetContents::setHttpHeaders($context);
}
$return = file_get_contents($filename, $use_include_path, $context);
FileGetContents::setLastResponseHeaders($http_response_header);
if (isset($http_response_header)) {
FileGetContents::setLastResponseHeaders($http_response_header);
}
return $return;
}

Expand Down

0 comments on commit 6679719

Please sign in to comment.