Skip to content
Snippets Groups Projects
Commit b92f90da authored by Kevin Hankens's avatar Kevin Hankens
Browse files

Undefined offset. kevin hankens #1113248

parent 5e9d9431
No related branches found
No related tags found
No related merge requests found
......@@ -96,7 +96,7 @@ function tablefield_field_presave($entity_type, $entity, $field, $instance, $lan
function tablefield_field_validate($entity_type, $entity, $field, $instance, $langcode, $items, &$errors) {
drupal_add_css(drupal_get_path('module', 'tablefield') . '/tablefield.css');
// Catch empty form submissions for required tablefields
if ($instance['required'] && tablefield_field_is_empty($items[0], $field)) {
if ($instance['required'] && isset($items[0]) && tablefield_field_is_empty($items[0], $field)) {
$message = t('@field is a required field.', array('@field' => $instance['label']));
$errors[$field['field_name']][$langcode][0]['tablefield'][] = array(
'error' => 'empty_required_tablefield',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment