]> git.mxchange.org Git - friendica.git/commitdiff
Check $url variable for value before using it in Module\Photo::getPhotoById
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 29 Jan 2023 05:12:59 +0000 (00:12 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sun, 29 Jan 2023 05:12:59 +0000 (00:12 -0500)
- Address https://github.com/friendica/friendica/issues/12488#issuecomment-1407342540

src/Module/Photo.php

index bb7ee60297c43dd2ccfa65ff5a654135de14dc76..7a952de407382ff8b4b56cda2b1488f4c183ceaf 100644 (file)
@@ -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);
                                }