From 48a7958ef9e9246dc75342030a1347fb22fe19d1 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 29 Jan 2023 00:12:59 -0500 Subject: [PATCH] Check $url variable for value before using it in Module\Photo::getPhotoById - Address https://github.com/friendica/friendica/issues/12488#issuecomment-1407342540 --- src/Module/Photo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Module/Photo.php b/src/Module/Photo.php index bb7ee6029..7a952de40 100644 --- a/src/Module/Photo.php +++ b/src/Module/Photo.php @@ -351,7 +351,7 @@ class Photo extends BaseModule } // If it is a local link, we save resources by just redirecting to it. - if (Network::isLocalLink($url)) { + if (!empty($url) && Network::isLocalLink($url)) { System::externalRedirect($url); }