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 adaeabe592
commit 6e0e86ced2

View File

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