From f5d8a5f645ee2fcf36dd2c7bb9cc36c06a241f10 Mon Sep 17 00:00:00 2001 From: regisoc Date: Tue, 13 Feb 2024 09:26:51 -0500 Subject: [PATCH 1/2] fix strtolower deprecation warning --- .../php/instrument_list_controlpanel.class.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/instrument_list/php/instrument_list_controlpanel.class.inc b/modules/instrument_list/php/instrument_list_controlpanel.class.inc index 811efeec2b0..7ebdebdc67d 100644 --- a/modules/instrument_list/php/instrument_list_controlpanel.class.inc +++ b/modules/instrument_list/php/instrument_list_controlpanel.class.inc @@ -470,8 +470,8 @@ class Instrument_List_ControlPanel extends \TimePoint $qcStatus = $this->getBVLQCStatus(); foreach ($this->bvlQcTypes as $type) { - $isSelected =$type == $this->getBVLQCType(); - $type =strtolower($type); + $isSelected = $type == $this->getBVLQCType(); + $type = strtolower($type ?? 'none'); if ($type==null) { $type ="none"; } @@ -509,8 +509,8 @@ class Instrument_List_ControlPanel extends \TimePoint $qcType = $this->getBVLQCType(); foreach ($this->bvlQcStatuses as $status) { - $isSelected =$status == $this->getBVLQCStatus(); - $status =strtolower($status); + $isSelected = $status == $this->getBVLQCStatus(); + $status = strtolower($status ?? 'none'); if ($status==null) { $status ="none"; } From 8fca9e034a03aef7fcabeb1a1e7f827d3ca8b011 Mon Sep 17 00:00:00 2001 From: regisoc Date: Tue, 13 Feb 2024 14:26:19 -0500 Subject: [PATCH 2/2] rm dead code --- .../php/instrument_list_controlpanel.class.inc | 6 ------ 1 file changed, 6 deletions(-) diff --git a/modules/instrument_list/php/instrument_list_controlpanel.class.inc b/modules/instrument_list/php/instrument_list_controlpanel.class.inc index 7ebdebdc67d..dafeeb20457 100644 --- a/modules/instrument_list/php/instrument_list_controlpanel.class.inc +++ b/modules/instrument_list/php/instrument_list_controlpanel.class.inc @@ -472,9 +472,6 @@ class Instrument_List_ControlPanel extends \TimePoint foreach ($this->bvlQcTypes as $type) { $isSelected = $type == $this->getBVLQCType(); $type = strtolower($type ?? 'none'); - if ($type==null) { - $type ="none"; - } if ($isSelected) { $this->tpl_data['bvl_qc_type_'.$type]['icon'] = 'far fa-check-square'; @@ -511,9 +508,6 @@ class Instrument_List_ControlPanel extends \TimePoint foreach ($this->bvlQcStatuses as $status) { $isSelected = $status == $this->getBVLQCStatus(); $status = strtolower($status ?? 'none'); - if ($status==null) { - $status ="none"; - } if ($isSelected) { $this->tpl_data['bvl_qc_status_'.$status]['icon'] = 'far fa-check-square';