summaryrefslogtreecommitdiff
path: root/classes/pluginhost.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/pluginhost.php')
-rwxr-xr-xclasses/pluginhost.php8
1 files changed, 8 insertions, 0 deletions
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);