From 12017b98da5b393518a32c263d97a0746bbe21fd Mon Sep 17 00:00:00 2001 From: Anagh Padmanabhan Date: Tue, 5 Sep 2017 12:13:42 +0530 Subject: [PATCH] Check if key exists and isn't null --- src/Quintype/Seo/Base.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Quintype/Seo/Base.php b/src/Quintype/Seo/Base.php index 3949f66..4857071 100644 --- a/src/Quintype/Seo/Base.php +++ b/src/Quintype/Seo/Base.php @@ -74,14 +74,14 @@ protected function getKeywords($params = []){ } else { if(isset($params['stories'])){ $keywordsArray = []; - if(isset($this->story['seo']['meta-keywords']) && !empty($this->story['seo']['meta-keywords'][0])) { + if(isset($this->story['seo']['meta-keywords']) && isset($this->story['seo']['meta-keywords'][0])) { $keywordsArray = $this->story['seo']['meta-keywords']; $keywords = implode($keywordsArray, ','); } else { foreach ($params['stories']['tags'] as $key => $value) { array_push($keywordsArray, $value['name']); } - $keywords = implode($keywordsArray, ','); + $keywords = implode($keywordsArray, ','); } } }