mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Making sure that DataObject->has*Field() methods always return an array, in order not to fail any array_key_exists() checks
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64000 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
b1b909103e
commit
5f50fee5e9
@ -2496,7 +2496,7 @@ class DataObject extends ViewableData implements DataObjectInterface {
|
||||
|
||||
// Child table
|
||||
} else {
|
||||
return $this->customDatabaseFields();
|
||||
return (array)$this->customDatabaseFields();
|
||||
}
|
||||
}
|
||||
|
||||
@ -2517,7 +2517,7 @@ class DataObject extends ViewableData implements DataObjectInterface {
|
||||
}
|
||||
}
|
||||
|
||||
return $def;
|
||||
return (array)$def;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2537,7 +2537,7 @@ class DataObject extends ViewableData implements DataObjectInterface {
|
||||
$fields = array_merge($fields, (array)$currentObj->customDatabaseFields());
|
||||
$currentObj = singleton($currentObj->parentClass());
|
||||
}
|
||||
return $fields;
|
||||
return (array)$fields;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user