Skip to content
Snippets Groups Projects
Commit 7cca52bc authored by David Suissa's avatar David Suissa Committed by Jakob P
Browse files

Issue #3465604 by dydave: TypeError: method_exists(): Argument #1...

Issue #3465604 by dydave: TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given
parent f37bc920
No related branches found
No related tags found
1 merge request!95Issue #3465604: Fixed 'TypeError: method_exists(): Argument #1 () must be of...
Checking pipeline status
......@@ -65,7 +65,7 @@ class MenuLinkEntity extends MenuLinkDefault {
* {@inheritdoc}
*/
public function getDescription() {
if (method_exists($this->entity, 'getDescription')) {
if ($this->entity && method_exists($this->entity, 'getDescription')) {
$description = $this->entity->getDescription();
}
return $description ?? parent::getDescription();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment