Merged from branches/2.3

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75591 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2009-04-29 01:21:38 +00:00
parent a5e82ddff1
commit 4615fd74b3
2 changed files with 2 additions and 2 deletions

View File

@ -629,7 +629,7 @@ class DataObjectSet extends ViewableData implements IteratorAggregate {
}
}
if($emptyString) $map = array('0' => "$emptyString") + $map;
if($emptyString) $map = array('' => "$emptyString") + $map;
if($sort) asort($map);
return $map;

View File

@ -112,7 +112,7 @@ class DataObjectSetTest extends SapphireTest {
$map = $comments->map('ID', 'Title', '(Select one)');
$expectedMap = array(
0 => '(Select one)',
'' => '(Select one)',
1 => 'Joe',
2 => 'Jane',
3 => 'Bob',