API CHANGE: array brackets removed for generation of field types

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87894 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Geoff Munn 2009-10-01 21:03:05 +00:00
parent 611af45993
commit 7eb3cf66e8

View File

@ -263,6 +263,10 @@ class ViewableData extends Object implements IteratorAggregate {
* @return array
*/
public static function castingObjectCreatorPair($fieldSchema) {
//Remove any array brackets:
if(strpos($fieldSchema, '[')!==false)
$fieldSchema=substr($fieldSchema, 0, strpos($fieldSchema, '['));
if(strpos($fieldSchema,'(') === false) {
return array(
'className' => $fieldSchema,