framework icon indicating copy to clipboard operation
framework copied to clipboard

[bug] Input::HasFile returns true when no file upload happened

Open peter-mdf opened this issue 13 years ago • 2 comments

According to the docs, Input::HasFile() should return true when a file is uploaded. Currently, it also returns true when no file is uploaded.

if (Input::hasFile('image'))
{
    var_dump(Input::hasFile('image'));
    var_dump(Input::file('image'));
}

displays:

boolean true
null

It only returns false when the input element is not in the form.

peter-mdf avatar Jan 22 '13 22:01 peter-mdf

Thanks, will get it fixed.

taylorotwell avatar Jan 23 '13 01:01 taylorotwell

Fixed.

taylorotwell avatar Jan 23 '13 01:01 taylorotwell