check a few more php8 warnings
This commit is contained in:
parent
8b39e6bca7
commit
9fdeb58fd3
|
@ -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');
|
||||
|
||||
|
|
|
@ -103,6 +103,7 @@ class Af_RedditImgur extends Plugin {
|
|||
|
||||
if (isset($data["media_metadata"])) {
|
||||
foreach ($data["media_metadata"] as $media) {
|
||||
if (!empty($media["s"]["u"])) {
|
||||
$media_url = htmlspecialchars_decode($media["s"]["u"]);
|
||||
|
||||
Debug::log("found media_metadata (gallery): $media_url", Debug::$LOG_VERBOSE);
|
||||
|
@ -113,6 +114,7 @@ class Af_RedditImgur extends Plugin {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// v.redd.it - see below
|
||||
/* if (is_array($data["media"])) {
|
||||
|
|
Loading…
Reference in New Issue