summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2025-04-14 15:28:57 +0300
committerAndrew Dolgov <fox@fakecake.org>2025-04-14 15:28:57 +0300
commit945690fffcabfeaa30d89514a1e81ea847091507 (patch)
tree339a79a05a7fccaf0a3e33f9cbaa88d9cb94d1e8
parent3c138a71a1749537680a23aca6d4181b5b2820f0 (diff)
add some type hints
-rwxr-xr-xplugins/cache_starred_images/init.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/cache_starred_images/init.php b/plugins/cache_starred_images/init.php
index 48c8df3db..da56da00d 100755
--- a/plugins/cache_starred_images/init.php
+++ b/plugins/cache_starred_images/init.php
@@ -128,6 +128,7 @@ class Cache_Starred_Images extends Plugin {
if ($article_id) {
$entries = $xpath->query('(//img[@src])|(//video/source[@src])');
+ /** @var DOMElement $entry */
foreach ($entries as $entry) {
if ($entry->hasAttribute('src')) {
$src = UrlHelper::rewrite_relative($site_url, $entry->getAttribute('src'));
@@ -203,6 +204,7 @@ class Cache_Starred_Images extends Plugin {
$xpath = new DOMXPath($doc);
$entries = $xpath->query('(//img[@src])|(//video/source[@src])');
+ /** @var DOMElement $entry */
foreach ($entries as $entry) {
if ($entry->hasAttribute('src') && !str_starts_with($entry->getAttribute('src'), "data:")) {