mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX: Prevent infinite recursion in certain object instantiation cases
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78253 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
4b78089e6a
commit
c542ec0de9
@ -196,8 +196,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
||||
$fields = Object::uninherited_static($class, 'db');
|
||||
|
||||
// Remove CompositeDBField instances, and replace with the actually used fields
|
||||
if($fields) foreach($fields as $fieldName => $fieldSpec) {
|
||||
$fieldClass = singleton($class)->db($fieldName);
|
||||
if($fields) foreach($fields as $fieldName => $fieldClass) {
|
||||
// Strip off any parameters
|
||||
if(strpos('(', $fieldClass) !== FALSE) $fieldClass = substr(0,strpos('(', $fieldClass), $fieldClass);
|
||||
if(ClassInfo::classImplements($fieldClass, 'CompositeDBField')) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user