diff --git a/classes/pluginhost.php b/classes/pluginhost.php index b6f645a9c..348c67bab 100755 --- a/classes/pluginhost.php +++ b/classes/pluginhost.php @@ -514,6 +514,14 @@ class PluginHost { } } + function get_array(Plugin $sender, string $name, array $default_value = []) { + $tmp = $this->get($sender, $name); + + if (!is_array($tmp)) $tmp = $default_value; + + return $tmp; + } + function get_all($sender) { $idx = get_class($sender);