diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2020-03-10 16:46:23 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-10 16:46:23 +0300 |
commit | 4265f8e6508ecefe159d2e4b598d334639012ce0 (patch) | |
tree | bbd57a4e60e94d6ac1ba43e15f1527a6844c8e4b /plugins/Proxy | |
parent | 1887ab9b4156fc4981ee6a280f93096dae256cac (diff) |
retry less compile if it fails (#15684)
Diffstat (limited to 'plugins/Proxy')
-rw-r--r-- | plugins/Proxy/Controller.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/Proxy/Controller.php b/plugins/Proxy/Controller.php index 0dfa3d03e3..4ffc45cc96 100644 --- a/plugins/Proxy/Controller.php +++ b/plugins/Proxy/Controller.php @@ -11,6 +11,7 @@ namespace Piwik\Plugins\Proxy; use Piwik\AssetManager; use Piwik\AssetManager\UIAsset; use Piwik\Common; +use Piwik\Exception\StylesheetLessCompileException; use Piwik\Piwik; use Piwik\ProxyHttp; use Piwik\Url; @@ -33,7 +34,11 @@ class Controller extends \Piwik\Plugin\Controller */ public function getCss() { - $cssMergedFile = AssetManager::getInstance()->getMergedStylesheet(); + try { + $cssMergedFile = AssetManager::getInstance()->getMergedStylesheet(); + } catch (StylesheetLessCompileException $exception) { + $cssMergedFile = AssetManager::getInstance()->getMergedStylesheet(); + } ProxyHttp::serverStaticFile($cssMergedFile->getAbsoluteLocation(), "text/css"); } |