fix for PHP Warning: Illegal string offset 'to_id' in api/src/Etemplate/Widget/Link.php on line 327

This commit is contained in:
Ralf Becker 2016-08-29 13:50:13 +02:00
parent 6599d0ae64
commit 59c098b2d6

View File

@ -326,6 +326,9 @@ class Link extends Etemplate\Widget
// keep values added into request by other ajax-functions, eg. files draged into htmlarea (Vfs) // 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 || !$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'],
);
$value['to_id'] = $expand['cont'][$this->id]['to_id']; $value['to_id'] = $expand['cont'][$this->id]['to_id'];
} }