]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/NoScrape.php
Merge pull request #12562 from MrPetovan/bug/notices
[friendica.git] / src / Module / NoScrape.php
index 718c95c107cc4de8b438a5c0cc2684313e73eb31..f5c5c725e0344928cca6bbd0f745f94025f0faed 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -23,7 +23,6 @@ namespace Friendica\Module;
 
 use Friendica\BaseModule;
 use Friendica\Core\System;
-use Friendica\Database\DBA;
 use Friendica\DI;
 use Friendica\Model\APContact;
 use Friendica\Model\User;
@@ -95,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);