Commit 1bd41887 authored by fago's avatar fago

fixed some possible notices in the views and entity metadata controllers.

parent a8d01078
......@@ -19,7 +19,7 @@ function entity_entity_property_info() {
if (!isset($info['metadata controller class']) && (!isset($info['module']) || !module_hook($info['module'], 'entity_property_info'))) {
$info['metadata controller class'] = 'EntityDefaultMetadataController';
}
if ($info['metadata controller class']) {
if (!empty($info['metadata controller class'])) {
$controller = new $info['metadata controller class']($type);
$items += $controller->entityPropertyInfo();
}
......
......@@ -109,7 +109,7 @@ class EntityDefaultViewsController {
*/
protected function schema_fields() {
$schema = drupal_get_schema($this->info['base table']);
$properties = entity_get_property_info($this->type);
$properties = entity_get_property_info($this->type) + array('properties' => array());
$data = array();
foreach ($properties['properties'] as $name => $property_info) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment