BUGFIX: Reduced reliance of specific data in the system

This commit is contained in:
Sam Minnee 2008-10-08 04:00:59 +00:00
parent 57a6790f6e
commit 4c9945d0fa

View File

@ -15,7 +15,9 @@ class TestCategory extends DataObject {
* Returns a dropdown map of all objects of this class
*/
static function map() {
return DataObject::get('TestCategory')->toDropdownMap();
$categories = DataObject::get('TestCategory');
if($categories) return $categories->toDropdownMap();
else return array();
}
function requireDefaultRecords(){