From ab48d9b3389f2f61da55d4519da3cc1ec78d74d4 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 18 May 2011 14:25:36 +0000 Subject: [PATCH] fixed an "htmlspecialchars 1. param should be string, array given" error --- etemplate/inc/class.link_widget.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/etemplate/inc/class.link_widget.inc.php b/etemplate/inc/class.link_widget.inc.php index 4df707d0b1..106aedb633 100644 --- a/etemplate/inc/class.link_widget.inc.php +++ b/etemplate/inc/class.link_widget.inc.php @@ -328,7 +328,11 @@ class link_widget case 'link-entry': if ($cell['readonly'] || $readonlys) { - if(!is_array($value)) $value = array('app' => $cell['size'],'id' => $value); + if(!is_array($value)) + { + if (strpos($value,':') !== false) list($app,$value) = explode(':',$value,2); + $value = array('app' => $app ? $app : $cell['size'],'id' => $value); + } $value = self::link2a_href($value,$help); $cell['type'] = 'html'; $cell['readonly'] = true;