note 81527 added to function.is-uploaded-file
| From: | Anonymous at osu1 dot php dot net | Date: | Sun, 02 Mar 2008 23:57:42 +0000 |
| Subject: | note 81527 added to function.is-uploaded-file | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-136676@lists.php.net to get a copy of this message | ||
> is_uploaded_file($_FILES['userfile']['tmp_name']);
> MUST always evaluate to true by definition which is, of course, useless.
This is not the case if there was an error in transmission (i.e. upload_max_filesize exceeded),
because then tmp_name contains an empty string.
So, this function still has the obvious use of an is_file() call, even for a trusted argument and
does NOT ALWAYS evaluate to true.
----
Server IP: 69.147.83.197
Probable Submitter: 87.178.100.230
----
Manual Page -- http://www.php.net/manual/en/function.is-uploaded-file.php
Edit -- https://master.php.net/note/edit/81527
Del: integrated -- https://master.php.net/note/delete/81527/integrated
Del: useless -- https://master.php.net/note/delete/81527/useless
Del: bad code -- https://master.php.net/note/delete/81527/bad+code
Del: spam -- https://master.php.net/note/delete/81527/spam
Del: non-english -- https://master.php.net/note/delete/81527/non-english
Del: in docs -- https://master.php.net/note/delete/81527/in+docs
Del: other reasons-- https://master.php.net/note/delete/81527
Reject -- https://master.php.net/note/reject/81527
Search -- https://master.php.net/manage/user-notes.php