Drozone returning array_filter() error #772
Replies: 2 comments
-
Well, theres 5 hours of my life I'll never get back. The problem seems to revolve around this code in medialibrary-uploaders/ MediaAjaxUploader.php
Its supposed to decode a/the JSON string into an array. If $uploads is null or if json_decode fails and returns null, its supposed to provide an empty array as a default value. However, It seems that despite the null coalescing operator, $uploads is still null when it reaches array_filter, which is why the error occurs. I've modified the method in MediaAjaxUploader.php to include an additional check and make sure an empty array is returned even when all else fails.
|
Beta Was this translation helpful? Give feedback.
-
Hey @logifloor, Sorry, you had to go through with this! I understand how this has been, spending time on this bug. I have assigned my colleague to go through with the problem & your proposed solution. We'll try to get it fixed soon. Thanks for everything! To be continued here Laravel-Backpack/medialibrary-uploaders#22 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm struggling with Dropzone uploads when using the Spatie media library addon. All is working well until I try and submit a form without any uploads (other fields text/date etc populated). I don't want to 'require' an upload because sometimes not necessary for this application, however, after extensive debugging, I can't find a solution to array_filter(): Argument #1 ($array) must be of type array, null given, when the files field is submitted empty. Anybody else come across this?
Beta Was this translation helpful? Give feedback.
All reactions