]> git.mxchange.org Git - friendica.git/commitdiff
Check for last-activity value before feeding it to strtotime in Module\NoScrape
authorHypolite Petovan <hypolite@mrpetovan.com>
Thu, 8 Dec 2022 03:31:27 +0000 (22:31 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sat, 10 Dec 2022 16:38:41 +0000 (11:38 -0500)
- Address https://github.com/friendica/friendica/issues/12011#issuecomment-1340019523

src/Module/NoScrape.php

index 8e5850ac0b4ad30efbfef9a67378054121eeffad..56f31f2dcfeef2d98926d0118710b430aef8d36d 100644 (file)
@@ -94,7 +94,7 @@ class NoScrape extends BaseModule
 
                // We display the last activity (post or login), reduced to year and week number
                $last_active = strtotime($owner['last-item']);
-               if ($last_active < strtotime($owner['last-activity'])) {
+               if ($owner['last-activity'] && $last_active < strtotime($owner['last-activity'])) {
                        $last_active = strtotime($owner['last-activity']);
                }
                $json_info['last-activity'] = date('o-W', $last_active);