|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70243 Notice when no file uploaded
Submitted: 2015-08-11 22:35 UTC Modified: 2015-08-13 17:09 UTC
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: scott dot vivian at gmail dot com Assigned:
Status: Not a bug Package: *Web Server problem
PHP Version: 7.0Git-2015-08-11 (Git) OS: Debian 8
Private report: No CVE-ID: None
 [2015-08-11 22:35 UTC] scott dot vivian at gmail dot com
To reproduce:
1. Make a form that has a "file" input type.
2. Submit the form without a file (e.g. fill in the other fields).

(Using the PHP7 Vagrant box with git updated to the latest master branch.)

Test script:

if (!empty($_POST)) {


<form enctype="multipart/form-data" method="post">
	<p><input type="text" name="name">
	<p><input type="file" name="file">
	<p><input type="submit" value="Save">

Actual result:
A notice that no file was supplied.

Notice: No file uploaded in Unknown on line 0

A very old bug #32446 seems to imply this has happened before so it may be a regression.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-08-12 06:46 UTC]
you are using a debug version PHP ...
 [2015-08-12 17:38 UTC]
-Status: Open +Status: Not a bug -Package: Unknown/Other Function +Package: *Web Server problem
 [2015-08-12 17:38 UTC]
> you are using a debug version PHP ...

Apparently so:
 [2015-08-13 17:09 UTC] scott dot vivian at gmail dot com
Apologies, yes I was running the debug version. Works fine with debug disabled.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Mar 04 02:01:29 2024 UTC