Skip to content

Commit c4632c2

Browse files
committed
Fix: Using ifEmpty(null) could result in a warning in PHP 8.1+
https://datatables.net/forums/discussion/81469
1 parent f532026 commit c4632c2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Editor/Format.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,10 @@ public static function fromDecimalChar($char = ',')
258258
public static function toDecimalChar($char = ',')
259259
{
260260
return static function ($val, $data) use ($char) {
261+
if ($val === null) {
262+
return null;
263+
}
264+
261265
return str_replace('.', $char, $val);
262266
};
263267
}

0 commit comments

Comments
 (0)