From c9348737b42d713e142c6b1df8f647afcf4842ba Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Thu, 10 Jan 2008 08:21:55 +0000 Subject: [PATCH] small bugfix for handling of unexpected info type not being an array --- infolog/inc/class.uiinfolog.inc.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/infolog/inc/class.uiinfolog.inc.php b/infolog/inc/class.uiinfolog.inc.php index 31e375523c..5ea0bd1235 100644 --- a/infolog/inc/class.uiinfolog.inc.php +++ b/infolog/inc/class.uiinfolog.inc.php @@ -940,10 +940,13 @@ class uiinfolog if ($content['js']) $content['js'] = ''; } // on a type-change, set the status to the default status of that type, if the actual status is not supported by the new type - if (!in_array($content['info_status'],$this->bo->status[$content['info_type']])) + if (is_array($this->bo->status[$content['info_type']])) { - $content['info_status'] = $this->bo->status['defaults'][$content['info_type']]; - if ($content['info_status'] != 'done') $content['info_datecompleted'] = ''; + if (!in_array($content['info_status'],$this->bo->status[$content['info_type']])) + { + $content['info_status'] = $this->bo->status['defaults'][$content['info_type']]; + if ($content['info_status'] != 'done') $content['info_datecompleted'] = ''; + } } } else