From 1683299d81d1a49b31e425f47e54ae365c9d0438 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Fri, 20 Apr 2012 15:24:17 +1200 Subject: [PATCH] MINOR Ignore any values that come through as arrays in DataObject::cache_composite_fields() --- model/DataObject.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/model/DataObject.php b/model/DataObject.php index 49d941089..773c91b48 100644 --- a/model/DataObject.php +++ b/model/DataObject.php @@ -271,6 +271,8 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity $fields = Config::inst()->get($class, 'db', Config::UNINHERITED); if($fields) foreach($fields as $fieldName => $fieldClass) { + if(!is_string($fieldClass)) continue; + // Strip off any parameters $bPos = strpos('(', $fieldClass); if($bPos !== FALSE) $fieldClass = substr(0,$bPos, $fieldClass);