avoid Warning when importing not yet created infolog-types

This commit is contained in:
Ralf Becker 2016-09-28 11:28:15 +02:00
parent 0d432dcaab
commit 2593932bc1

View File

@ -760,7 +760,8 @@ class infolog_bo
// Make sure status is still valid if the type changes
if($old['info_type'] != $values['info_type'] && $values['info_status'])
{
if(!in_array($values['info_status'], array_keys($this->status[$values['info_type']])))
if (isset($this->status[$values['info_type']]) &&
!in_array($values['info_status'], array_keys($this->status[$values['info_type']])))
{
$values['info_status'] = $this->status['defaults'][$values['info_type']];
}