Skip to content

Commit

Permalink
Fix for PHP 8.1 deprecated "Implicit conversion from float to int los…
Browse files Browse the repository at this point in the history
…es precision"
  • Loading branch information
elring authored and Pavel Janda committed Feb 15, 2022
1 parent a91ad12 commit af427ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Traits/TButtonRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ public function applyReplacements(Row $row, string $column): array
{
$value = $row->getValue($column);

if ((is_scalar($value) || $value === null) && isset($this->replacements[$value])) {
return [true, $this->replacements[$value]];
if ((is_scalar($value) || $value === null) && isset($this->replacements[gettype($value) == 'double' ? (int)$value : $value])) {
return [true, $this->replacements[gettype($value) == 'double' ? (int)$value : $value]];
}

return [false, null];
Expand Down

0 comments on commit af427ff

Please sign in to comment.