Skip to content

Commit aaf2764

Browse files
committed
fix error with str_singular() helper
1 parent 18e33df commit aaf2764

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Traits/LfmHelpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ public function translateToUtf8($input)
332332
*/
333333
public function isProcessingImages()
334334
{
335-
return lcfirst(str_singular(request('type', ''))) === 'image';
335+
return lcfirst(str_singular(request('type', '') ?: '')) === 'image';
336336
}
337337

338338
/**

src/views/index.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@
206206
}
207207
});
208208
},
209-
acceptedFiles: "{{ lcfirst(str_singular(request('type'))) == 'image' ? implode(',', config('lfm.valid_image_mimetypes')) : implode(',', config('lfm.valid_file_mimetypes')) }}",
210-
maxFilesize: ({{ lcfirst(str_singular(request('type'))) == 'image' ? config('lfm.max_image_size') : config('lfm.max_file_size') }} / 1000)
209+
acceptedFiles: "{{ lcfirst(str_singular(request('type') ?: '')) == 'image' ? implode(',', config('lfm.valid_image_mimetypes')) : implode(',', config('lfm.valid_file_mimetypes')) }}",
210+
maxFilesize: ({{ lcfirst(str_singular(request('type') ?: '')) == 'image' ? config('lfm.max_image_size') : config('lfm.max_file_size') }} / 1000)
211211
}
212212
</script>
213213
</body>

0 commit comments

Comments
 (0)