From 59c098b2d6f953bf224eec40084b7418374fff41 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 29 Aug 2016 13:50:13 +0200 Subject: [PATCH] fix for PHP Warning: Illegal string offset 'to_id' in api/src/Etemplate/Widget/Link.php on line 327 --- api/src/Etemplate/Widget/Link.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/src/Etemplate/Widget/Link.php b/api/src/Etemplate/Widget/Link.php index d52b0c728c..2f163de2dd 100644 --- a/api/src/Etemplate/Widget/Link.php +++ b/api/src/Etemplate/Widget/Link.php @@ -326,6 +326,9 @@ class Link extends Etemplate\Widget // 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 (!is_array($value)) $value = array( + 'to_app' => $expand['cont'][$this->id]['to_app'], + ); $value['to_id'] = $expand['cont'][$this->id]['to_id']; }