In a Laravel Nova application i've got a strange issue: Whenever i try to download a file i have a linefeed char on the first line (0A, an empty line). This corrupts images, zip-files and so on. But what is causing this?
I've tried/checked:
- Check all php files on closing tags (there are none)
- Original file on hdd does not have this extra linefeed when it's created
- Checked every php file since last release for correct UTF-8 encoding
- Copied composer.lock from live server and installed everything again
- Ran composer dump, php artisan cache:clear, php artisan clear-compiled
- Checked all code changes since the last release (where there was no issue)
- Tried Chrome and Firefox
Here's some Laravel Nova code that produced this error:
return Fields\Image::make(__('Image')), 'imageStorage') ->rules('image', "dimensions:max_width={$image_max_width},max_height={$image_max_height}") ->squared() ->disk(Enums\StorageDisk::APP_PUBLIC_DISTRIBUTORS) ->path(DistributorPath::products($distributorId)) ->deletable(false) ->prunable() ->onlyOnForms();
First charachter is always 0A.
So, how do i find the cause? Any tips or strategy?