fix link-widget with fixed app returned array(0) instead of 0 for nothing selected, caused by r54196

This commit is contained in:
Ralf Becker 2015-11-09 19:21:19 +00:00
parent 809c35e97d
commit df3aee9210

View File

@ -300,7 +300,7 @@ class etemplate_widget_link extends etemplate_widget
$value = $value_in =& self::get_array($content, $form_name); $value = $value_in =& self::get_array($content, $form_name);
// keep values added into request by other ajax-functions, eg. files draged into htmlarea (etemplate_widget_vfs) // keep values added into request by other ajax-functions, eg. files draged into htmlarea (etemplate_widget_vfs)
if (!$value['to_id']) if ((!$value || !$value['to_id']) && is_array($expand['cont'][$this->id]) && !empty($expand['cont'][$this->id]['to_id']))
{ {
$value['to_id'] = $expand['cont'][$this->id]['to_id']; $value['to_id'] = $expand['cont'][$this->id]['to_id'];
} }