mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
611af45993
commit
7eb3cf66e8
@ -263,6 +263,10 @@ class ViewableData extends Object implements IteratorAggregate {
|
|||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public static function castingObjectCreatorPair($fieldSchema) {
|
public static function castingObjectCreatorPair($fieldSchema) {
|
||||||
|
//Remove any array brackets:
|
||||||
|
if(strpos($fieldSchema, '[')!==false)
|
||||||
|
$fieldSchema=substr($fieldSchema, 0, strpos($fieldSchema, '['));
|
||||||
|
|
||||||
if(strpos($fieldSchema,'(') === false) {
|
if(strpos($fieldSchema,'(') === false) {
|
||||||
return array(
|
return array(
|
||||||
'className' => $fieldSchema,
|
'className' => $fieldSchema,
|
||||||
|
Loading…
Reference in New Issue
Block a user