From f1c91c84ddee0a9f3ef6d0775f630822c184963f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 25 Oct 2025 11:21:28 +0200 Subject: Bump phpstan/phpstan from 2.1.29 to 2.1.31 (#8156) * Bump phpstan/phpstan from 2.1.29 to 2.1.31 Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan-phar-composer-source) from 2.1.29 to 2.1.31. - [Commits](https://github.com/phpstan/phpstan-phar-composer-source/commits) --- updated-dependencies: - dependency-name: phpstan/phpstan dependency-version: 2.1.31 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Fixes --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alexandre Alapetite --- app/Models/Feed.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/Models/Feed.php b/app/Models/Feed.php index 4f8a9130d..fd9177d4e 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -943,6 +943,9 @@ class FreshRSS_Feed extends Minz_Model { // If the result is a list, then aggregate as a JSON array $result = []; foreach ($jsonFragments as $node) { + if (!($node instanceof DOMNode)) { + continue; + } $json = json_decode($node->textContent, true); if (json_last_error() === JSON_ERROR_NONE && is_array($json)) { $result[] = $json; @@ -1067,6 +1070,9 @@ class FreshRSS_Feed extends Minz_Model { } foreach ($nodes as $node) { + if (!($node instanceof DOMNode)) { + continue; + } $item = []; $item['title'] = $xPathItemTitle == '' ? '' : $xpathEvaluateString($xPathItemTitle, $node); @@ -1077,7 +1083,9 @@ class FreshRSS_Feed extends Minz_Model { // List of nodes, save as HTML $content = ''; foreach ($result as $child) { - $content .= $doc->saveHTML($child) . "\n"; + if ($child instanceof DOMNode) { + $content .= $doc->saveHTML($child) . "\n"; + } } $item['content'] = $content; } elseif (is_string($result) || is_int($result) || is_bool($result)) { @@ -1103,7 +1111,9 @@ class FreshRSS_Feed extends Minz_Model { } elseif ($itemCategories instanceof DOMNodeList && $itemCategories->length > 0) { $item['tags'] = []; foreach ($itemCategories as $itemCategory) { - $item['tags'][] = $itemCategory->textContent; + if ($itemCategory instanceof DOMNode) { + $item['tags'][] = $itemCategory->textContent; + } } } } -- cgit v1.2.3