Avoid a Illegal string offset warning from link-entry widgets when they have only-app attribute set

Happened on infologs added from projectmanager element list
This commit is contained in:
nathangray 2016-07-21 12:51:32 -06:00
parent 4aad06e61d
commit 3b1ce04608

View File

@ -317,7 +317,7 @@ class Link extends Etemplate\Widget
$value = $value_in =& self::get_array($content, $form_name);
// keep values added into request by other ajax-functions, eg. files draged into htmlarea (Vfs)
if ((!$value || !$value['to_id']) && is_array($expand['cont'][$this->id]) && !empty($expand['cont'][$this->id]['to_id']))
if ((!$value || is_array($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'];
}