From 868a61dd34160c4fababb7bfd850c409cb2cab1f Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Sat, 24 Oct 2015 14:53:16 -0600 Subject: [PATCH] Fail quietly if file doesn't exist --- system/src/Grav/Common/Assets.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/system/src/Grav/Common/Assets.php b/system/src/Grav/Common/Assets.php index e2f39d2e5..17bf5787b 100644 --- a/system/src/Grav/Common/Assets.php +++ b/system/src/Grav/Common/Assets.php @@ -976,7 +976,12 @@ class Assets $link = ROOT_DIR . $relative_path; } - $file = ($this->fetch_command instanceof Closure) ? $this->fetch_command->__invoke($link) : file_get_contents($link); + $file = ($this->fetch_command instanceof Closure) ? @$this->fetch_command->__invoke($link) : @file_get_contents($link); + + // No file found, skip it... + if ($file === false) { + continue; + } // Double check last character being if (!$css) {