Skip to content

Commit

Permalink
Merge pull request #1972 from MGatner/fix-custom-collectors
Browse files Browse the repository at this point in the history
Toolbar fix for custom collectors
  • Loading branch information
lonnieezell authored Apr 25, 2019
2 parents b9c14be + 8fe6159 commit 8ac5c73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions system/Debug/Toolbar/Collectors/BaseCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,9 @@ protected function formatTimelineData(): array
/**
* Returns the data of this collector to be formatted in the toolbar
*
* @return array
* @return array|string
*/
public function display(): array
public function display()
{
return [];
}
Expand Down
2 changes: 1 addition & 1 deletion system/Debug/Toolbar/Views/toolbar.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
<div id="ci-<?= $c['titleSafe'] ?>" class="tab">
<h2><?= $c['title'] ?> <span><?= $c['titleDetails'] ?></span></h2>

<?= $parser->setData($c['display'])->render("_{$c['titleSafe']}.tpl") ?>
<?= is_string($c['display']) ? $c['display'] : $parser->setData($c['display'])->render("_{$c['titleSafe']}.tpl") ?>
</div>
<?php endif ?>
<?php endif ?>
Expand Down

0 comments on commit 8ac5c73

Please sign in to comment.