From 75171b94f872f6becd07e1d236dc7089812537bf Mon Sep 17 00:00:00 2001 From: Marko Kallio Date: Mon, 9 Oct 2017 16:32:16 +0300 Subject: [PATCH] Update UrlHelper.php Fixed bug with missing file inside plugin --- src/View/Helper/UrlHelper.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/View/Helper/UrlHelper.php b/src/View/Helper/UrlHelper.php index 172c3e104ed..db044c32987 100644 --- a/src/View/Helper/UrlHelper.php +++ b/src/View/Helper/UrlHelper.php @@ -218,9 +218,11 @@ public function assetTimestamp($path) if (Plugin::loaded($plugin)) { unset($segments[0]); $pluginPath = Plugin::path($plugin) . 'webroot' . DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, $segments); - //@codingStandardsIgnoreStart - return $path . '?' . @filemtime($pluginPath); - //@codingStandardsIgnoreEnd + if (file_exists($pluginPath)) { + //@codingStandardsIgnoreStart + return $path . '?' . @filemtime($pluginPath); + //@codingStandardsIgnoreEnd4 + } } }