Skip to content

Commit cae3158

Browse files
committed
UserPanel: uses capturing
1 parent 9d8c960 commit cae3158

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/Bridges/SecurityTracy/UserPanel.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ public function getTab(): ?string
3939
return null;
4040
}
4141

42-
ob_start(function () {});
43-
$user = $this->user;
44-
require __DIR__ . '/templates/UserPanel.tab.phtml';
45-
return ob_get_clean();
42+
return Nette\Utils\Helpers::capture(function () {
43+
$user = $this->user;
44+
require __DIR__ . '/templates/UserPanel.tab.phtml';
45+
});
4646
}
4747

4848

@@ -51,9 +51,9 @@ public function getTab(): ?string
5151
*/
5252
public function getPanel(): string
5353
{
54-
ob_start(function () {});
55-
$user = $this->user;
56-
require __DIR__ . '/templates/UserPanel.panel.phtml';
57-
return ob_get_clean();
54+
return Nette\Utils\Helpers::capture(function () {
55+
$user = $this->user;
56+
require __DIR__ . '/templates/UserPanel.panel.phtml';
57+
});
5858
}
5959
}

0 commit comments

Comments
 (0)