diff options
author | Bart Visscher <bartv@thisnet.nl> | 2013-07-16 22:37:32 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2013-07-16 22:37:32 +0200 |
commit | 971a3fd124785033e7ed7db1018512b838c5ec58 (patch) | |
tree | 78959038f1c8e2bffc3049740705ebd5a94c6c01 /lib/template.php | |
parent | 49fca86f3c9b135f87b842e95e5f5ad76736e52e (diff) | |
download | nextcloud-server-971a3fd124785033e7ed7db1018512b838c5ec58.tar.gz nextcloud-server-971a3fd124785033e7ed7db1018512b838c5ec58.zip |
Early errors (in base.php) don't have session available
Diffstat (limited to 'lib/template.php')
-rw-r--r-- | lib/template.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/template.php b/lib/template.php index ae9ea187445..a1808c0b356 100644 --- a/lib/template.php +++ b/lib/template.php @@ -181,7 +181,7 @@ class OC_Template{ $this->renderas = $renderas; $this->application = $app; $this->vars = array(); - $this->vars['requesttoken'] = OC_Util::callRegister(); + $this->vars['requesttoken'] = OC::$session && OC_Util::callRegister(); $parts = explode('/', $app); // fix translation when app is something like core/lostpassword $this->l10n = OC_L10N::get($parts[0]); @@ -243,6 +243,9 @@ class OC_Template{ */ static public function getFormFactorExtension() { + if (!\OC::$session) { + return ''; + } // if the formfactor is not yet autodetected do the // autodetection now. For possible formfactors check the // detectFormfactor documentation |