mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX #3061: Text.FirstSentence returns '.' instead of '' on an empty field
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@65842 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
7318977194
commit
05e042427b
@ -96,6 +96,8 @@ class Text extends DBField {
|
||||
*/
|
||||
function FirstSentence() {
|
||||
$data = Convert::xml2raw( $this->value );
|
||||
if( !$data ) return "";
|
||||
|
||||
|
||||
$sentences = explode( '.', $data );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user