Browse Source

pluginhost: always return an array in get_all()

Andrew Dolgov 6 years ago
parent
commit
6fb5f17be6
1 changed files with 3 additions and 1 deletions
  1. 3 1
      classes/pluginhost.php

+ 3 - 1
classes/pluginhost.php

@@ -360,7 +360,9 @@ class PluginHost {
 	function get_all($sender) {
 		$idx = get_class($sender);
 
-		return $this->storage[$idx];
+		$data = $this->storage[$idx];
+
+		return $data ? $data : [];
 	}
 
 	function clear_data($sender) {