Skip to content

Commit

Permalink
Fix typo in attribute name
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdebril committed Mar 9, 2021
1 parent 828717d commit 90c049c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/FeedIo/Formatter/JsonFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function itemToArray(Feed\ItemInterface $item) : array
*/
public function itemToBaseArray(Feed\ItemInterface $item) : array
{
$offset = $this->isHtml($item->getDescription()) ? 'content_html':'content_txt';
$offset = $this->isHtml($item->getDescription()) ? 'content_html':'content_text';
return [
'id' => $item->getPublicId(),
'title' => $item->getTitle(),
Expand All @@ -91,9 +91,9 @@ public function itemToBaseArray(Feed\ItemInterface $item) : array
* @param $string
* @return bool
*/
public function isHtml(string $string) : bool
public function isHtml(?string $string) : bool
{
return $string !== strip_tags($string);
return !! $string && $string !== strip_tags($string);
}

public function handleAuthor(Feed\NodeInterface $node, array &$array) : array
Expand Down

0 comments on commit 90c049c

Please sign in to comment.