File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -82,10 +82,15 @@ public function hasReplacements(): bool
8282 public function applyReplacements (Row $ row , string $ column ): array
8383 {
8484 $ value = $ row ->getValue ($ column );
85+ if (!is_scalar ($ value ) && $ value !== null ) {
86+ return [false , null ];
87+ }
88+
89+ // Ensure null is converted to string to avoid deprecation warning
90+ $ key = gettype ($ value ) === 'double ' ? (int ) $ value : ($ value ?? '' );
8591
86- if ((is_scalar ($ value ) || $ value === null ) &&
87- isset ($ this ->replacements [gettype ($ value ) === 'double ' ? (int ) $ value : $ value ])) {
88- return [true , $ this ->replacements [gettype ($ value ) === 'double ' ? (int ) $ value : $ value ]];
92+ if (isset ($ this ->replacements [$ key ])) {
93+ return [true , $ this ->replacements [$ key ]];
8994 }
9095
9196 return [false , null ];
You can’t perform that action at this time.
0 commit comments