diff --git a/api/src/Sharing.php b/api/src/Sharing.php index 76c8c24d1f..0e7234c5c3 100644 --- a/api/src/Sharing.php +++ b/api/src/Sharing.php @@ -208,6 +208,11 @@ class Sharing } } + // Load lang preference for error translations + if(empty($GLOBALS['egw_info']['user']['preferences']['common']['lang'])) + { + $GLOBALS['egw_info']['user']['preferences'] = (new Preferences(Accounts::id2name('anonymous', 'account_id')))->read(); + } if (empty($token) || !($share = self::$db->select(self::TABLE, '*', array( 'share_token' => $token, '(share_expires IS NULL OR share_expires > '.self::$db->quote(time(), 'date').')',