From 1a58c0ba08c10a3b589e53bd34b456ae6416f46a Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 23 Aug 2017 10:30:04 +0200 Subject: [PATCH] fix PHP Warning with non-stock InfoLog types --- infolog/inc/class.infolog_bo.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/infolog/inc/class.infolog_bo.inc.php b/infolog/inc/class.infolog_bo.inc.php index 605cd7a9f6..2ca7f70548 100644 --- a/infolog/inc/class.infolog_bo.inc.php +++ b/infolog/inc/class.infolog_bo.inc.php @@ -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