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 committed by Ralf Becker
parent f4c89ac916
commit 09482bd032

View File

@ -324,7 +324,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']))
{
if (!is_array($value)) $value = array(
'to_app' => $expand['cont'][$this->id]['to_app'],