mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-06-04 22:32:51 -04:00
ProblemsBadge: Don't throw exception within getTitle() & make return type optional
refs #420
This commit is contained in:
parent
964b5f2f9a
commit
f5304591ea
1 changed files with 2 additions and 8 deletions
|
|
@ -107,16 +107,10 @@ abstract class ProblemsBadge extends NavigationItemRenderer
|
|||
/**
|
||||
* Get the title
|
||||
*
|
||||
* @return string
|
||||
* @return ?string
|
||||
*/
|
||||
public function getTitle(): string
|
||||
public function getTitle()
|
||||
{
|
||||
if ($this->title === null) {
|
||||
throw new \LogicException(
|
||||
'You are accessing an unset property. Please make sure to set it beforehand.'
|
||||
);
|
||||
}
|
||||
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue