From 5115c38355c518a7b9077ab5d1bbdd2b50bc21d9 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 16 Dec 2008 07:21:04 +0000 Subject: [PATCH] ENHANCEMENT Changed order of array merging in DataObject->db() - contains fields from subclasses at end of the array instead of the beginning. Important because db() is used by FormScaffolder, which shoved custom fields on the front of auto-generated forms. Shouldn't have any effect on the actual content of returned array git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69207 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/DataObject.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/model/DataObject.php b/core/model/DataObject.php index b6db294d2..54760b917 100644 --- a/core/model/DataObject.php +++ b/core/model/DataObject.php @@ -1294,7 +1294,7 @@ class DataObject extends ViewableData implements DataObjectInterface,i18nEntityP if(!is_string($k) || is_numeric($k) || !is_string($v)) user_error("$class::\$db has a bad entry: " . var_export($k,true). " => " . var_export($v,true) . ". Each map key should be a property name, and the map value should be the property type.", E_USER_ERROR); } - $items = isset($items) ? array_merge($newItems, (array)$items) : $newItems; + $items = isset($items) ? array_merge((array)$items, $newItems) : $newItems; } }