From 7d9f8f1b1272a59a34f413e57f638f6180e36826 Mon Sep 17 00:00:00 2001 From: Nivanka Fonseka Date: Thu, 29 Nov 2018 12:23:11 +0530 Subject: [PATCH] null pointer exception fixed --- src/Extensions/ElementDocumentGeneratorExtension.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Extensions/ElementDocumentGeneratorExtension.php b/src/Extensions/ElementDocumentGeneratorExtension.php index ac35325..d4cefb8 100644 --- a/src/Extensions/ElementDocumentGeneratorExtension.php +++ b/src/Extensions/ElementDocumentGeneratorExtension.php @@ -52,7 +52,9 @@ public function makeSearchDocumentForPage() /* @var $element BaseElement */ $element = $this->owner; $page = $element->getPage(); - self::make_document_for($page); + if($page) { + self::make_document_for($page); + } } }