From 69b32cf7f09deeb50104adb1c97a477046680e6f Mon Sep 17 00:00:00 2001 From: Kodeus Date: Wed, 11 Oct 2017 10:16:40 +0200 Subject: [PATCH] [Toolbar]: return empty array when no data can be collected, needed for toolbartwigextension --- .../AdminBundle/Toolbar/BundleVersionDataCollector.php | 4 ++-- src/Kunstmaan/NodeBundle/Toolbar/NodeDataCollector.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Kunstmaan/AdminBundle/Toolbar/BundleVersionDataCollector.php b/src/Kunstmaan/AdminBundle/Toolbar/BundleVersionDataCollector.php index 33d151aa5c..de5b5bca4f 100644 --- a/src/Kunstmaan/AdminBundle/Toolbar/BundleVersionDataCollector.php +++ b/src/Kunstmaan/AdminBundle/Toolbar/BundleVersionDataCollector.php @@ -46,7 +46,7 @@ public function collectData() public function collect(Request $request, Response $response, \Exception $exception = null) { if (!$this->isEnabled()) { - $this->data = false; + $this->data = []; } else { $this->data = $this->collectData(); } @@ -71,4 +71,4 @@ public function isEnabled() { return $this->versionChecker->isEnabled(); } -} \ No newline at end of file +} diff --git a/src/Kunstmaan/NodeBundle/Toolbar/NodeDataCollector.php b/src/Kunstmaan/NodeBundle/Toolbar/NodeDataCollector.php index 5363cadb39..066a3ae561 100644 --- a/src/Kunstmaan/NodeBundle/Toolbar/NodeDataCollector.php +++ b/src/Kunstmaan/NodeBundle/Toolbar/NodeDataCollector.php @@ -60,7 +60,7 @@ public function collectData() return ['data' => $data]; } - return null; + return []; } /**