Skip to content

Commit

Permalink
MINOR Reverted r105264, breaks CompositeFieldTest, FieldSetTest, Tran…
Browse files Browse the repository at this point in the history
…slatableTest (from r105274)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112474 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information
chillu committed Oct 15, 2010
1 parent bcbe9c2 commit 68fcd8c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions forms/FieldSet.php
Expand Up @@ -335,8 +335,7 @@ public function insertBefore($item, $name) {
$i = 0;
foreach($this->items as $child) {
if($name == $child->Name() || $name == $child->id) {
// On PHP 5.2.6, using $this->items directly in array_splice can segfault
$itms = $this->items; array_splice($itms, $i, 0, array($item));
array_splice($this->items, $i, 0, array($item));
return $item;
} elseif($child->isComposite()) {
$ret = $child->insertBefore($item, $name);
Expand Down

0 comments on commit 68fcd8c

Please sign in to comment.