MINOR: PHP notice fixes

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.2@64638 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew O'Neil 2008-10-22 03:48:20 +00:00 committed by Sam Minnee
parent 8edd31a8ed
commit 766ce65d0b
2 changed files with 2 additions and 1 deletions

View File

@ -573,7 +573,7 @@ class DataObjectSet extends ViewableData implements IteratorAggregate {
* @return array
*/
public function map($key = "ID", $value = "Title", $includeBlank=null) {
$map = array();
/* Don't do this, add this locally.
* Reasons: 1: In some case this blank value don't/mustn't present.
2: In some case, this balnk value should be customised, such as (Select from below)

View File

@ -73,6 +73,7 @@ class Text extends DBField {
* @param int $sentCount The amount of sentences you want.
*/
function LimitSentences($sentCount = 2) {
$output = '';
$data = Convert::xml2raw($this->value);
$sentences = explode('.', $data);
if(count($sentences) == 1) {