Skip to content

Commit 881d85f

Browse files
authored
A crutch for a theme with bad code
1 parent 5459dbf commit 881d85f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Block/Post/View.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ class View extends AbstractPost implements \Magento\Framework\DataObject\Identit
2121
*/
2222
public function getIdentities()
2323
{
24-
return $this->getPost()->getIdentities();
24+
if ($this->getPost()) {
25+
return $this->getPost()->getIdentities();
26+
} else {
27+
return [];
28+
}
2529
}
2630

2731
/**

0 commit comments

Comments
 (0)