From 0d8ad3b500b9b08e788984aff15bce4bfb1174a0 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Wed, 12 Jul 2017 10:05:59 +0800 Subject: [PATCH] MDL-59431 requirejs: Prioritise errors --- lib/requirejs.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/requirejs.php b/lib/requirejs.php index a01d2e3e44e..f6140a484e6 100644 --- a/lib/requirejs.php +++ b/lib/requirejs.php @@ -100,7 +100,9 @@ if ($rev > 0 and $rev < (time() + 60 * 60)) { $js = file_get_contents($jsfile); if ($js === false) { error_log('Failed to load JavaScript file ' . $jsfile); - $js = '/* Failed to load JavaScript file ' . $jsfile . '. */'; + $js = "/* Failed to load JavaScript file {$jsfile}. */\n"; + $content = $js . $content; + continue; } $js .= "\n"; // Inject the module name into the define. -- 2.43.0