DataObject decorator bug fixing - addStaticVars() function.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@39284 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Kirti Nanji 2007-07-26 21:57:01 +00:00
parent 4160579f97
commit 94fc673f97

View File

@ -243,14 +243,12 @@ class Object {
if (empty(Object::$extraStatics[$class])) {
Object::$extraStatics[$class] = (array)$statics;
} else {
Object::$extraStatics[$class] = array_merge(
(array)Object::$extraStatics[$class],
(array)$statics
);
$ar1 = (array)Object::$extraStatics[$class]; // First Array To Merge
$ar2 = (array)$statics; // Second Array To Merge
Object::$extraStatics[$class] = array_merge_recursive($ar1, $ar2);
}
}
function parentClass() {
return get_parent_class($this);
}