diff --git a/addressbook/inc/class.addressbook_ui.inc.php b/addressbook/inc/class.addressbook_ui.inc.php index 5f6318a00b..242d13eaf6 100644 --- a/addressbook/inc/class.addressbook_ui.inc.php +++ b/addressbook/inc/class.addressbook_ui.inc.php @@ -2984,7 +2984,7 @@ class addressbook_ui extends addressbook_bo if(is_array($content)) { - $button = key($content['button']); + $button = is_array($content['button']) ? key($content['button']) : ""; switch ($button) { case 'vcard': diff --git a/infolog/inc/class.infolog_bo.inc.php b/infolog/inc/class.infolog_bo.inc.php index df93074b61..4de6836937 100644 --- a/infolog/inc/class.infolog_bo.inc.php +++ b/infolog/inc/class.infolog_bo.inc.php @@ -609,7 +609,7 @@ class infolog_bo function &read($info_id,$run_link_id2from=true,$date_format='ts',$ignore_acl=false) { //error_log(__METHOD__.'('.array2string($info_id).', '.array2string($run_link_id2from).", '$date_format') ".function_backtrace()); - if (is_scalar($info_id) || isset($info_id[count($info_id)-1])) + if (is_scalar($info_id) || is_array($info_id) && isset($info_id[count($info_id)-1])) { if (is_scalar($info_id) && !is_numeric($info_id)) {