php.net |  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
Votes:1
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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: scott dot vivian at gmail dot com
New email:
PHP Version: OS:

 

 [2015-08-11 22:35 UTC] scott dot vivian at gmail dot com
Description:
------------
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:
---------------
<?php

if (!empty($_POST)) {
	var_dump($_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">
</form>


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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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

Apparently so:
<https://github.com/php/php-src/blob/php-7.0.0beta3/main/rfc1867.c#L1001-L1003>.
 [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: Thu Mar 28 15:01:29 2024 UTC