mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUG: DataObject::__construct() now accepts stdClass for $record
This commit is contained in:
parent
43cd54bb25
commit
a651d730f2
@ -323,7 +323,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
||||
);
|
||||
}
|
||||
|
||||
if(!is_array($record)) {
|
||||
if(!is_array($record) && !is_a($record, "stdClass")) {
|
||||
if(is_object($record)) $passed = "an object of type '$record->class'";
|
||||
else $passed = "The value '$record'";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user