From 1081de20e11d2bfb9b55a4cb32be10e1f30a667c Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Thu, 8 Dec 2016 12:40:59 +0000 Subject: [PATCH] MDL-57319 outputlib: raise timeout for scss/less compilation --- lib/outputlib.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/outputlib.php b/lib/outputlib.php index 1466e0316ea..1c4f4788210 100644 --- a/lib/outputlib.php +++ b/lib/outputlib.php @@ -1130,8 +1130,9 @@ class theme_config { throw new coding_exception('The theme did not define a LESS file, or it is not readable.'); } - // We might need more memory to do this, so let's play safe. + // We might need more memory/time to do this, so let's play safe. raise_memory_limit(MEMORY_EXTRA); + core_php_time_limit::raise(300); // Files list. $files = $this->get_css_files($themedesigner); @@ -1195,8 +1196,9 @@ class theme_config { throw new coding_exception('The theme did not define a SCSS file, or it is not readable.'); } - // We might need more memory to do this, so let's play safe. + // We might need more memory/time to do this, so let's play safe. raise_memory_limit(MEMORY_EXTRA); + core_php_time_limit::raise(300); // Set-up the compiler. $compiler = new core_scss(); @@ -1574,8 +1576,9 @@ class theme_config { $needsparsing = !empty($treeprocessor) || !empty($this->rtlmode); if ($needsparsing) { - // We might need more memory to do this, so let's play safe. + // We might need more memory/time to do this, so let's play safe. raise_memory_limit(MEMORY_EXTRA); + core_php_time_limit::raise(300); $parser = new core_cssparser($css); $csstree = $parser->parse();