Merge pull request #414 from dhensby/pulls/casting-fix

FIX Excerpt should be casted as HTMLText
This commit is contained in:
Damian Mooyman 2016-09-08 22:45:10 +12:00 committed by GitHub
commit 033a7bb96f

View File

@ -83,7 +83,7 @@ class BlogPost extends Page
* @var array
*/
private static $casting = array(
'Excerpt' => 'Text',
'Excerpt' => 'HTMLText',
'Date' => 'SS_Datetime',
);
@ -549,9 +549,7 @@ class BlogPost extends Page
*/
public function Excerpt($wordsToDisplay = 30)
{
/**
* @var Text $content
*/
/** @var HTMLText $content */
$content = $this->dbObject('Content');
return $content->Summary($wordsToDisplay);