small bugfix for handling of unexpected info type not being an array

This commit is contained in:
Klaus Leithoff 2008-01-10 08:21:55 +00:00
parent a045eaaff5
commit c9348737b4

View File

@ -940,10 +940,13 @@ class uiinfolog
if ($content['js']) $content['js'] = '<script>'.$content['js'].'</script>';
}
// 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