fix PHP Warning with non-stock InfoLog types

This commit is contained in:
Ralf Becker 2017-08-23 10:30:04 +02:00
parent 6db82fbbf2
commit 1a58c0ba08

View File

@ -825,8 +825,8 @@ class infolog_bo
{
$values['info_percent'] = 0;
}
else if (
($values['info_status'] != 'archive' && $values['info_status'] != 'cancelled' && in_array($values['info_status'], $this->stock_status[$values['info_type']])) &&
else if (($values['info_status'] != 'archive' && $values['info_status'] != 'cancelled' &&
isset($this->stock_status[$values['info_type']]) && in_array($values['info_status'], $this->stock_status[$values['info_type']])) &&
((int)$values['info_percent'] == 100 || $values['info_percent'] == 0))
{
// We change percent to match status, not status to match percent