Skip to content

Commit

Permalink
Merged revisions 45750 via svnmerge from
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Sam Minnee committed Feb 19, 2008
1 parent 03e67fe commit 7babce4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/model/DataObjectSet.php
Expand Up @@ -390,8 +390,8 @@ public function push($item, $key = null) {
* @param string $key Key to index this DataObject by.
*/
public function insertFirst($item, $key = null) {
if($key != null) {
array_shift($this->items, $item);
if($key == null) {
array_unshift($this->items, $item);
} else {
// Not very efficient :-(
$newItems = array();
Expand Down

0 comments on commit 7babce4

Please sign in to comment.