FIX Excerpt should be casted as HTMLText

This commit is contained in:
Daniel Hensby 2016-09-08 11:00:15 +01:00
parent 0f77789eb5
commit ffab2df9d2
No known key found for this signature in database
GPG Key ID: B00D1E9767F0B06E

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);