From 6fb5f17be69f9ff3a0e1379e64a3c7bd71ab3271 Mon Sep 17 00:00:00 2001
From: Andrew Dolgov <fox@fakecake.org>
Date: Sun, 17 Dec 2017 19:06:18 +0300
Subject: [PATCH] pluginhost: always return an array in get_all()

---
 classes/pluginhost.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/classes/pluginhost.php b/classes/pluginhost.php
index 4224893c2..4eada78b2 100644
--- a/classes/pluginhost.php
+++ b/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) {
-- 
GitLab