mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Ignore any values that come through as arrays in DataObject::cache_composite_fields()
This commit is contained in:
parent
58599dc9d1
commit
1683299d81
@ -271,6 +271,8 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
|||||||
|
|
||||||
$fields = Config::inst()->get($class, 'db', Config::UNINHERITED);
|
$fields = Config::inst()->get($class, 'db', Config::UNINHERITED);
|
||||||
if($fields) foreach($fields as $fieldName => $fieldClass) {
|
if($fields) foreach($fields as $fieldName => $fieldClass) {
|
||||||
|
if(!is_string($fieldClass)) continue;
|
||||||
|
|
||||||
// Strip off any parameters
|
// Strip off any parameters
|
||||||
$bPos = strpos('(', $fieldClass);
|
$bPos = strpos('(', $fieldClass);
|
||||||
if($bPos !== FALSE) $fieldClass = substr(0,$bPos, $fieldClass);
|
if($bPos !== FALSE) $fieldClass = substr(0,$bPos, $fieldClass);
|
||||||
|
Loading…
Reference in New Issue
Block a user