From 1f18997b2d72a5aea772f0f9d6ddb61718fbd380 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 27 Apr 2018 14:00:57 +0200 Subject: Don't try to load non-existent style.css/clientscript.js --- inc/module.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/module.inc.php b/inc/module.inc.php index fa2c4b98..6d160787 100644 --- a/inc/module.inc.php +++ b/inc/module.inc.php @@ -283,7 +283,7 @@ class Module public function getScripts() { if ($this->directActivation && $this->clientPlugin) { - if (!in_array('clientscript.js', $this->scripts)) { + if (!in_array('clientscript.js', $this->scripts) && file_exists($this->getDir() . '/clientscript.js')) { $this->scripts[] = 'clientscript.js'; } return $this->scripts; @@ -294,7 +294,7 @@ class Module public function getCss() { if ($this->directActivation && $this->clientPlugin) { - if (!in_array('style.css', $this->css)) { + if (!in_array('style.css', $this->css) && file_exists($this->getDir() . '/style.css')) { $this->css[] = 'style.css'; } return $this->css; -- cgit v1.2.3-55-g7522