From 3e8501a139ef497a2a06fbf396f5c27bc26732a1 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 21 May 2012 10:56:14 +0000 Subject: [PATCH] fixed PHP 5.4 Warning: Illegal string offset --- etemplate/inc/class.link_widget.inc.php | 2 +- phpgwapi/inc/class.egw_link.inc.php | 2 +- preferences/inc/class.bosettings.inc.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/etemplate/inc/class.link_widget.inc.php b/etemplate/inc/class.link_widget.inc.php index 7c0d5ef88c..ecff4486e9 100644 --- a/etemplate/inc/class.link_widget.inc.php +++ b/etemplate/inc/class.link_widget.inc.php @@ -116,7 +116,7 @@ class link_widget { $extension_data['type'] = $type = $cell['type']; $extension_data['needed'] = $cell['needed']; - $help = $cell['help'] ? ($value['help'] ? $value['help'] : $cell['help']) : lang('view this linked entry in its application'); + $help = $cell['help'] ? (is_array($value) && !empty($value['help']) ? $value['help'] : $cell['help']) : lang('view this linked entry in its application'); if ((in_array($type,array('link-to','link-add','link-entry')) && !$value) && ($cell['readonly'] || $readonlys)) { diff --git a/phpgwapi/inc/class.egw_link.inc.php b/phpgwapi/inc/class.egw_link.inc.php index 1d40485253..4f4e3924bd 100644 --- a/phpgwapi/inc/class.egw_link.inc.php +++ b/phpgwapi/inc/class.egw_link.inc.php @@ -480,7 +480,7 @@ class egw_link extends solink { foreach($targets as $link) { - $app_ids[$link['app']][] = $link['id']; + if (is_array($link)) $app_ids[$link['app']][] = $link['id']; } } foreach($app_ids as $app => $a_ids) diff --git a/preferences/inc/class.bosettings.inc.php b/preferences/inc/class.bosettings.inc.php index e12c5793ea..8c9cfcf363 100644 --- a/preferences/inc/class.bosettings.inc.php +++ b/preferences/inc/class.bosettings.inc.php @@ -223,7 +223,7 @@ } $prefs[$var] = get_magic_quotes_gpc() ? stripslashes($value) : $value; - if($notifies[$var]) // need to translate the key-words back + if(is_array($notifies) && isset($notifies[$var])) // need to translate the key-words back { $prefs[$var] = $GLOBALS['egw']->preferences->lang_notify($prefs[$var],$notifies[$var],True); }