]> git.mxchange.org Git - friendica.git/commitdiff
Check if the string representation of Notify->link is empty in Module\Notifications...
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 3 Oct 2021 15:34:23 +0000 (11:34 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sun, 3 Oct 2021 15:34:23 +0000 (11:34 -0400)
- The property is a Url object which will always return true when tested for truthy value

src/Module/Notifications/Notification.php

index 2480e63b0bab005a1bae3392cc74c00a45a33842..19ee410d2825c06cc4a77e9ef0edaa97b695b0b9 100644 (file)
@@ -124,7 +124,7 @@ class Notification extends BaseModule
                                DI::notify()->setAllSeenForRelatedNotify($Notify);
                        }
 
-                       if ($Notify->link) {
+                       if ((string)$Notify->link) {
                                System::externalRedirect($Notify->link);
                        }