From 4d0eb5e5298fb44db7adead6156d14a5486d94b4 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Mon, 9 Dec 2013 21:55:49 +0100 Subject: [PATCH] Fixed #988 --- src/API/PluginAPI.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/API/PluginAPI.php b/src/API/PluginAPI.php index cc6e3c47..5fce80a9 100644 --- a/src/API/PluginAPI.php +++ b/src/API/PluginAPI.php @@ -41,6 +41,10 @@ class PluginAPI extends stdClass{ } public function load($file){ + if(is_link($file) or is_dir($file) or !file_exists($file)){ + console("[ERROR] ".basename($file)." is not a file"); + return false; + } if(strtolower(substr($file, -3)) === "pmf"){ $pmf = new PMFPlugin($file); $info = $pmf->getPluginInfo();