File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -182,11 +182,11 @@ protected function open(): void
182182 throw new \Exception (sprintf ('Error during the opening of the %s file ' , $ this ->filename ));
183183 }
184184 if ($ this ->addUtf8Bom ) {
185- if (! fwrite ($ this ->handle , \chr (0xEF ).\chr (0xBB ).\chr (0xBF ))) {
185+ if (false === fwrite ($ this ->handle , \chr (0xEF ).\chr (0xBB ).\chr (0xBF ))) {
186186 throw new \Exception (sprintf ('Error during the UTF8-BOM writing in %s file ' , $ this ->filename ));
187187 }
188188 }
189- if (! empty ($ this ->header )) {
189+ if (null !== $ this -> header && \count ($ this ->header ) > 0 ) {
190190 $ this ->write ($ this ->header );
191191 $ this ->lines = 0 ;
192192 --$ this ->totalLines ;
@@ -237,7 +237,7 @@ public function write($data): void
237237 }
238238
239239 // New file
240- if ($ this ->maxLines && $ this ->maxLines == $ this ->lines ) {
240+ if (null !== $ this ->maxLines && $ this ->maxLines == $ this ->lines ) {
241241 $ this ->newFile ();
242242 }
243243
You can’t perform that action at this time.
0 commit comments