diff --git a/composer.json b/composer.json index bd87516..4cf164e 100644 --- a/composer.json +++ b/composer.json @@ -36,8 +36,8 @@ }, "autoload": { "psr-4": { - "CyberDuck\\SEO\\": "src/", - "CyberDuck\\SEO\\Tests\\": "tests/" + "PlasticStudio\\SEO\\": "src/", + "PlasticStudio\\SEO\\Tests\\": "tests/" } }, "extra": { diff --git a/src/Forms/MetaPreviewField.php b/src/Forms/MetaPreviewField.php index d1e7474..c3bacd8 100644 --- a/src/Forms/MetaPreviewField.php +++ b/src/Forms/MetaPreviewField.php @@ -111,7 +111,9 @@ private function getPageMetaDescription() if(class_exists(BlogPost::class)) { if($this->page instanceof BlogPost) { if($this->page->Parent()->DefaultPostMetaDescription == 1) { - return strip_tags($this->page->Summary); + if ($this->page->Summary) { + return strip_tags($this->page->Summary); + } } } } diff --git a/src/Model/Extension/SeoPageExtension.php b/src/Model/Extension/SeoPageExtension.php index fc84a23..2da00cb 100644 --- a/src/Model/Extension/SeoPageExtension.php +++ b/src/Model/Extension/SeoPageExtension.php @@ -459,7 +459,9 @@ public function getPageMetaDescription() if(class_exists(BlogPost::class)) { if($this->owner instanceof BlogPost) { if($this->owner->Parent()->DefaultPostMetaDescription == 1) { - return strip_tags($this->owner->Summary); + if ($this->page->Summary) { + return strip_tags($this->page->Summary); + } } } }