From 2c0b7d164c69edcc71b699a0a9727a40fde92d86 Mon Sep 17 00:00:00 2001 From: Andrew Robert Nicols Date: Wed, 27 Mar 2013 13:12:58 +0000 Subject: [PATCH] MDL-38756 JavaScript: Handle missing jsrev during installation During installation, jsrev is unset so unavailable for the cache checks. The installation sets the initial jsrev value and this is updated periodically, unless it is set to -1 for JS developer. During installation, we shouldn't really use any caches so if jsrev is unset, then we should act as though it is set to developer. --- lib/outputrequirementslib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/outputrequirementslib.php b/lib/outputrequirementslib.php index 21291007087..2c49b1bf5d5 100644 --- a/lib/outputrequirementslib.php +++ b/lib/outputrequirementslib.php @@ -1356,7 +1356,7 @@ class YUI_config { } $cache = cache::make('core', 'yuimodules'); - if ($CFG->jsrev == -1) { + if (!isset($CFG->jsrev) || $CFG->jsrev == -1) { $metadata = array(); $cache->delete('metadata'); } else { -- 2.43.0