mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merged revisions 45750 via svnmerge from
svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.1.0-rc3oriwave2 ........ r45750 | sminnee | 2007-11-27 17:45:36 +1300 (Tue, 27 Nov 2007) | 1 line Fixed DataObjectSet::insertFirst() - it now uses a numeric key rather than null ........ git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@49791 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
03e67fe100
commit
7babce4a66
@ -390,8 +390,8 @@ class DataObjectSet extends ViewableData implements Iterator {
|
|||||||
* @param string $key Key to index this DataObject by.
|
* @param string $key Key to index this DataObject by.
|
||||||
*/
|
*/
|
||||||
public function insertFirst($item, $key = null) {
|
public function insertFirst($item, $key = null) {
|
||||||
if($key != null) {
|
if($key == null) {
|
||||||
array_shift($this->items, $item);
|
array_unshift($this->items, $item);
|
||||||
} else {
|
} else {
|
||||||
// Not very efficient :-(
|
// Not very efficient :-(
|
||||||
$newItems = array();
|
$newItems = array();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user