diff --git a/application/forms/SyncPropertyForm.php b/application/forms/SyncPropertyForm.php index 436f1c64..77d40d89 100644 --- a/application/forms/SyncPropertyForm.php +++ b/application/forms/SyncPropertyForm.php @@ -75,7 +75,10 @@ class SyncPropertyForm extends DirectorObjectForm if ($destination === 'import') { $funcTemplates = 'enum' . ucfirst($this->rule->object_type) . 'Templates'; $templates = $this->db->$funcTemplates(); - $templates = array_combine($templates, $templates); + if (! empty($templates)) { + $templates = array_combine($templates, $templates); + } + $this->addElement('select', 'source_expression', array( 'label' => $this->translate('Template'), // Objecttype? 'multiOptions' => $this->optionalEnum($templates),