diff --git a/inc/plugin.class.php b/inc/plugin.class.php index c9e2e22..e015ed7 100644 --- a/inc/plugin.class.php +++ b/inc/plugin.class.php @@ -25,9 +25,9 @@ $module["module"]["name"]="Plugin Class"; $module["module"]["ver"]="0.1.1"; class plugins{ - var $hooks; - var $current_hook; - var $plugin_=array(); + var array $hooks; + var string $current_hook; + var array $plugin_=array(); function load_plugins($region='G'){ global $config, $db; @@ -63,6 +63,9 @@ class plugins{ function run_hook($name,$variables=array()) { + if(empty($this->hooks)){ + return false; + } if(array_key_exists($name,$this->hooks)){ if(!is_array($this->hooks[$name])) { @@ -92,6 +95,7 @@ class plugins{ $this->current_hook = ''; return $return; } + return false; }