fixed an "htmlspecialchars 1. param should be string, array given" error

This commit is contained in:
Ralf Becker 2011-05-18 14:21:02 +00:00
parent 7de4e0108d
commit 1053267a96

View File

@ -329,7 +329,11 @@ class link_widget
case 'link-entry': case 'link-entry':
if ($cell['readonly'] || $readonlys) 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); $value = self::link2a_href($value,$help);
$cell['type'] = 'html'; $cell['type'] = 'html';
$cell['readonly'] = true; $cell['readonly'] = true;