aboutsummaryrefslogtreecommitdiff
path: root/lib/favicons.php
diff options
context:
space:
mode:
authorGravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 2025-10-25 11:21:28 +0200
committerGravatar GitHub <noreply@github.com> 2025-10-25 11:21:28 +0200
commitf1c91c84ddee0a9f3ef6d0775f630822c184963f (patch)
tree5a5291a2b29ff7614fc35d6d6c891abb1e090a52 /lib/favicons.php
parent11863fa00e71b05fe29529ab7588a4b845b6805a (diff)
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] <support@github.com> * Fixes --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'lib/favicons.php')
-rw-r--r--lib/favicons.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/favicons.php b/lib/favicons.php
index 3072874d7..786f832fc 100644
--- a/lib/favicons.php
+++ b/lib/favicons.php
@@ -26,6 +26,10 @@ function faviconCachePath(string $url): string {
}
function searchFavicon(string $url): string {
+ $url = trim($url);
+ if ($url === '') {
+ return '';
+ }
$dom = new DOMDocument();
['body' => $html, 'effective_url' => $effective_url, 'fail' => $fail] = httpGet($url, cachePath: CACHE_PATH . '/' . sha1($url) . '.html', type: 'html');
if ($fail || $html === '' || !@$dom->loadHTML($html, LIBXML_NONET | LIBXML_NOERROR | LIBXML_NOWARNING)) {