From b4ebecb7d75e51497a1bfb64036dc65bd046cdd7 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Wed, 12 Jul 2017 09:45:20 +0800 Subject: [PATCH] MDL-59431 requirejs: Correct failed JS check --- lib/requirejs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/requirejs.php b/lib/requirejs.php index b348ee4f566..a01d2e3e44e 100644 --- a/lib/requirejs.php +++ b/lib/requirejs.php @@ -98,7 +98,7 @@ if ($rev > 0 and $rev < (time() + 60 * 60)) { $content = ''; foreach ($jsfiles as $modulename => $jsfile) { $js = file_get_contents($jsfile); - if ($jsfile === false) { + if ($js === false) { error_log('Failed to load JavaScript file ' . $jsfile); $js = '/* Failed to load JavaScript file ' . $jsfile . '. */'; }