From fcfb9e975836c4abbbfd339d46bf8ea937747e57 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 7 Sep 2022 12:50:46 +0000 Subject: fix random php warnings --- include/security.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/security.php') diff --git a/include/security.php b/include/security.php index 881adb818..de9f1f337 100644 --- a/include/security.php +++ b/include/security.php @@ -604,7 +604,8 @@ function public_permissions_sql($observer_hash) { function get_form_security_token($typename = '') { $timestamp = time(); - $sec_hash = hash('whirlpool', App::$observer['xchan_guid'] . ((local_channel()) ? App::$channel['channel_prvkey'] : '') . session_id() . $timestamp . $typename); + $guid = App::$observer['xchan_guid'] ?? ''; + $sec_hash = hash('whirlpool', $guid . ((local_channel()) ? App::$channel['channel_prvkey'] : '') . session_id() . $timestamp . $typename); return $timestamp . '.' . $sec_hash; } -- cgit v1.2.3