Skip to content

Commit

Permalink
Fix: PHP 8 warning on showOptionals on extrafields type int
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-eoxia committed Sep 26, 2024
1 parent a61fba7 commit bdbea43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion htdocs/core/class/commonobject.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -8651,7 +8651,7 @@ public function showOptionals($extrafields, $mode = 'view', $params = null, $key
$value = $getposttemp;
}
} elseif (in_array($extrafields->attributes[$this->table_element]['type'][$key], array('int'))) {
$value =( !empty($this->array_options["options_".$key]) || $this->array_options["options_".$key] === '0' ) ? $this->array_options["options_".$key] : '';
$value =( !empty($this->array_options["options_".$key]) || (isset($this->array_options["options_".$key]) && $this->array_options["options_".$key] === '0')) ? $this->array_options["options_".$key] : '';
} else {
$value = (!empty($this->array_options["options_".$key]) ? $this->array_options["options_".$key] : ''); // No GET, no POST, no default value, so we take value of object.
}
Expand Down

0 comments on commit bdbea43

Please sign in to comment.