Skip to content

Commit

Permalink
Check if shortDescription is set before setting tag line
Browse files Browse the repository at this point in the history
  • Loading branch information
DariusIII committed Sep 30, 2019
1 parent daef97f commit 8262a6d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Mappers/MovieMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ protected function getObject()
$movie->setExplicit($this->data->collectionExplicitness === self::IDENTIFER_EXPLICIT);
$movie->setReleaseDate(new \DateTime($this->data->releaseDate));
$movie->setDescription($this->data->longDescription);
$movie->setTagLine($this->data->shortDescription);
if (isset($this->data->shortDescription)) {
$movie->setTagLine($this->data->shortDescription);
}
$movie->setGenre($this->data->primaryGenreName);

return $movie;
Expand Down

0 comments on commit 8262a6d

Please sign in to comment.