]> git.mxchange.org Git - friendica.git/blobdiff - src/BaseModule.php
Merge pull request #10179 from nupplaphil/fix/transifex_script
[friendica.git] / src / BaseModule.php
index a9f67f2375306daf3511cc6073f379ae40877a50..19b58ad06683f8413ae6a2385b69d42909a81c24 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -140,11 +140,7 @@ abstract class BaseModule
                        return false;
                }
 
-               if (empty($a->user)) {
-                       return false;
-               }
-
-               $sec_hash = hash('whirlpool', $a->user['guid'] . $a->user['prvkey'] . session_id() . $x[0] . $typename);
+               $sec_hash = hash('whirlpool', ($a->user['guid'] ?? '') . ($a->user['prvkey'] ?? '') . session_id() . $x[0] . $typename);
 
                return ($sec_hash == $x[1]);
        }