Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.3.2

Bug #20957 Error with getting file array
Submitted: 2015-10-02 17:40 UTC
From: loki Assigned:
Status: Open Package: HTML_QuickForm2 (version 2.0.2)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


 [2015-10-02 17:40 UTC] loki (Alexander Levin)
Description: ------------ Error getting uploaded file with using html file arrays: <input type='file' name='myfile[]' /> Test script: --------------- $form=new HTML_QuickForm2(null, 'post', array('action'=>'#'), false); $file=$form->addElement('file', 'myfile[]', array('multiple'=>'multiple'), array('label'=>'Upload file')); if ($form->validate()) { var_dump($form->getValue()); } echo $form; Expected result: ---------------- array 'myfile' => array 'name' => array 0 => string 'file1.jpg' (length=36) 1 => string 'file2.jpeg' (length=37) ... 'type' => array 0 => string 'image/jpeg' (length=10) 1 => string 'image/jpeg' (length=10) ... 'tmp_name' => array 0 => string '/tmp/php2D.tmp' (length=16) 1 => string '/tmp/php2E.tmp' (length=16) ... 'error' => array 0 => int 0 1 => int 0 ... 'size' => array 0 => int 5806 1 => int 4979 ... Actual result: -------------- empty

Comments