Tabs: Method `render()` does not expect any param and import missing Exception class

This commit is contained in:
Sukhwinder Dhillon 2023-08-16 10:12:16 +02:00 committed by raviks789
parent 29b2ed22b9
commit 30b91b9cd2
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@
namespace Icinga\Web\Widget; namespace Icinga\Web\Widget;
use Exception;
use Icinga\Exception\Http\HttpNotFoundException; use Icinga\Exception\Http\HttpNotFoundException;
use Icinga\Exception\ProgrammingError; use Icinga\Exception\ProgrammingError;
use Icinga\Web\Url; use Icinga\Web\Url;
@ -389,7 +390,7 @@ EOT;
public function __toString() public function __toString()
{ {
try { try {
$html = $this->render(Icinga::app()->getViewRenderer()->view); $html = $this->render();
} catch (Exception $e) { } catch (Exception $e) {
return htmlspecialchars($e->getMessage()); return htmlspecialchars($e->getMessage());
} }