Skip to content
Snippets Groups Projects
Commit caca3353 authored by Jürgen Haas's avatar Jürgen Haas Committed by mandclu
Browse files

Issue #3252848: Undefined variables bundle and entity_type

parent d93e7507
No related branches found
No related tags found
1 merge request!15Issue #3252848: Undefined variables bundle and entity_type
......@@ -330,14 +330,12 @@ class SmartDateWidgetBase extends DateTimeWidgetBase {
$allow_recurring = FALSE;
}
if ($allow_recurring && function_exists('smart_date_recur_widget_extra_fields')) {
if ($allow_recurring && function_exists('smart_date_recur_widget_extra_fields') && $form_state->getFormObject() instanceof EntityFormInterface) {
// Provide extra parameters to be stored with the recurrence rule.
$month_limit = SmartDateRule::getMonthsLimit($field_def);
if ($form_state->getFormObject() instanceof EntityFormInterface) {
$entity = $form_state->getformObject()->getEntity();
$entity_type = $entity->getEntityTypeId();
$bundle = $entity->bundle();
}
$entity = $form_state->getformObject()->getEntity();
$entity_type = $entity->getEntityTypeId();
$bundle = $entity->bundle();
$field_name = $field_def->getName();
smart_date_recur_generate_rows($values, $entity_type, $bundle, $field_name, $month_limit);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment