Commit 6f5c0063 authored by Dries's avatar Dries

- Patch #862352 by chx: fields without columns throw notices.

parent 4fe9ef99
......@@ -677,20 +677,21 @@ function field_sql_storage_field_storage_purge_field($field) {
*/
function field_sql_storage_field_storage_details($field) {
$details = array();
// Add field columns.
foreach ((array) $field['columns'] as $column_name => $attributes) {
$real_name = _field_sql_storage_columnname($field['field_name'], $column_name);
$columns[$column_name] = $real_name;
}
return array(
'sql' => array(
FIELD_LOAD_CURRENT => array(
_field_sql_storage_tablename($field) => $columns,
),
FIELD_LOAD_REVISION => array(
_field_sql_storage_revision_tablename($field) => $columns,
if (!empty($field['columns'])) {
// Add field columns.
foreach ($field['columns'] as $column_name => $attributes) {
$real_name = _field_sql_storage_columnname($field['field_name'], $column_name);
$columns[$column_name] = $real_name;
}
return array(
'sql' => array(
FIELD_LOAD_CURRENT => array(
_field_sql_storage_tablename($field) => $columns,
),
FIELD_LOAD_REVISION => array(
_field_sql_storage_revision_tablename($field) => $columns,
),
),
),
);
);
}
}
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