Skip to content
Snippets Groups Projects
Unverified Commit 899af783 authored by Joas Schilling's avatar Joas Schilling
Browse files

Catch exception from path info


We don't really care when the path info can not be gathered correctly.
we will simply not use SCSS then but the CSS fallback.

Signed-off-by: default avatarJoas Schilling <coding@schilljs.com>
parent d3f774d0
No related branches found
No related tags found
No related merge requests found
...@@ -159,11 +159,18 @@ class TemplateLayout extends \OC_Template { ...@@ -159,11 +159,18 @@ class TemplateLayout extends \OC_Template {
$this->append( 'jsfiles', $web.'/'.$file . $this->getVersionHashSuffix() ); $this->append( 'jsfiles', $web.'/'.$file . $this->getVersionHashSuffix() );
} }
try {
$pathInfo = \OC::$server->getRequest()->getPathInfo();
} catch (\Exception $e) {
$pathInfo = '';
}
// Do not initialise scss appdata until we have a fully installed instance // Do not initialise scss appdata until we have a fully installed instance
// Do not load scss for update, errors, installation or login page // Do not load scss for update, errors, installation or login page
if(\OC::$server->getSystemConfig()->getValue('installed', false) if(\OC::$server->getSystemConfig()->getValue('installed', false)
&& !\OCP\Util::needUpgrade() && !\OCP\Util::needUpgrade()
&& !preg_match('/^\/login/', \OC::$server->getRequest()->getPathInfo())) { && $pathInfo !== ''
&& !preg_match('/^\/login/', $pathInfo)) {
$cssFiles = self::findStylesheetFiles(\OC_Util::$styles); $cssFiles = self::findStylesheetFiles(\OC_Util::$styles);
} else { } else {
// If we ignore the scss compiler, // If we ignore the scss compiler,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment