From 9fdeb58fd39fb24aafebd67ad88f58be12b8ce7d Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 6 Feb 2021 09:51:28 +0300 Subject: check a few more php8 warnings --- classes/sanitizer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/sanitizer.php b/classes/sanitizer.php index 9f3bfada0..64b2edd36 100644 --- a/classes/sanitizer.php +++ b/classes/sanitizer.php @@ -97,7 +97,7 @@ class Sanitizer { } if ($entry->hasAttribute('src') && - ($owner && get_pref("STRIP_IMAGES", $owner)) || $force_remove_images || $_SESSION["bw_limit"]) { + ($owner && get_pref("STRIP_IMAGES", $owner)) || $force_remove_images || ($_SESSION["bw_limit"] ?? false)) { $p = $doc->createElement('p'); @@ -147,7 +147,7 @@ class Sanitizer { 'sup', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'wbr', 'video', 'xml:namespace' ); - if ($_SESSION['hasSandbox']) $allowed_elements[] = 'iframe'; + if ($_SESSION['hasSandbox'] ?? false) $allowed_elements[] = 'iframe'; $disallowed_attributes = array('id', 'style', 'class', 'width', 'height', 'allow'); -- cgit v1.2.3