PHP allows you to set the name attribute on the input field in such a way that multiple files are uploaded as an array. Transliteration doesn't take this possibility into account and runs into errors as it tries to pass arrays to preg_match() and strtolower()

This patch (built against 6.x-3.x, but successfully applied to 7.x-3.x) modifies transliteration_clean_filename() to behave recursively if $filename happens to be an array.

For an example of a module that uses this functionality, see the Webform Multifile sandbox module.

CommentFileSizeAuthor
file-array-support.patch1.54 KBcyborg_572
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mikeytown2’s picture

Status: Needs review » Reviewed & tested by the community
amateescu’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

fix link