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:
Ingo Schommer 2008-10-09 14:39:24 +00:00
parent b1b909103e
commit 5f50fee5e9

View File

@ -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;
}
/**