Skip to content

Commit 84cab53

Browse files
committed
Prevent PHP error on modern versions of PHP.
1 parent 54a2020 commit 84cab53

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

gdpr_cookies.module

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ function gdpr_cookies_exit() {
3636
// after all.
3737
// Make sure to exclude image style images (is this even required anymore??).
3838
// Make sure the buffer has a length.
39-
if (stripos(backdrop_get_http_header('content-type'), 'text/html') !== FALSE && !is_file($current_path) && ob_get_length()) {
39+
$http_header = backdrop_get_http_header('content-type');
40+
if (isset($http_header) && stripos($http_header, 'text/html') !== FALSE && !is_file($current_path) && ob_get_length()) {
4041

4142
// Catch the output buffer. Converted from ob_get_clean().
4243
$page = ob_get_contents();

0 commit comments

Comments
 (0)