Skip to content

Commit

Permalink
Check if key exists and isn't null
Browse files Browse the repository at this point in the history
  • Loading branch information
anagh-p committed Sep 5, 2017
1 parent 838ac95 commit 12017b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Quintype/Seo/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -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, ',');
}
}
}
Expand Down

0 comments on commit 12017b9

Please sign in to comment.