Skip to content

Commit

Permalink
[instrument_list] Fix deprecation warning (aces#8867)
Browse files Browse the repository at this point in the history
Fix the warnings:

```
<b>Deprecated</b>:  strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in <b>modules/instrument_list/php/instrument_list_controlpanel.class.inc</b> on line <b>475</b><br />
<br />
<b>Deprecated</b>:  strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in <b>modules/instrument_list/php/instrument_list_controlpanel.class.inc</b> on line <b>514</b><br />
```

in PHP 8.2 and above.
  • Loading branch information
driusan authored Dec 12, 2023
1 parent edc730f commit abc7e10
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions modules/instrument_list/php/instrument_list_controlpanel.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -471,11 +471,8 @@ class Instrument_List_ControlPanel extends \TimePoint
$qcStatus = $this->getBVLQCStatus();

foreach ($this->bvlQcTypes as $type) {
$isSelected =$type == $this->getBVLQCType();
$type =strtolower($type);
if ($type==null) {
$type ="none";
}
$isSelected = $type == $this->getBVLQCType();
$type = strtolower($type ?? 'none');
if ($isSelected) {
$this->tpl_data['bvl_qc_type_'.$type]['icon']
= 'far fa-check-square';
Expand Down Expand Up @@ -510,11 +507,8 @@ class Instrument_List_ControlPanel extends \TimePoint
$qcType = $this->getBVLQCType();

foreach ($this->bvlQcStatuses as $status) {
$isSelected =$status == $this->getBVLQCStatus();
$status =strtolower($status);
if ($status==null) {
$status ="none";
}
$isSelected = $status == $this->getBVLQCStatus();
$status = strtolower($status ?? 'none');
if ($isSelected) {
$this->tpl_data['bvl_qc_status_'.$status]['icon']
= 'far fa-check-square';
Expand Down

0 comments on commit abc7e10

Please sign in to comment.