Why error codes when downloading files in php miss number '5'?

I am writing a custom error handling / reporting function to upload PHP files, and I noticed that the returned error codes are numbered 0 to 8, with the exception of 5.

Is this a typo in the source I'm using, or is it really so? If so, I am curious why they missed the number "5".

Thanks.

Edit In response to Pekka here are the error codes from the PHP manual.

 0 |  UPLOAD_ERR_OK |  There is no error, the file uploaded with success.
 1 |  UPLOAD_ERR_INI_SIZE |  Size exceeds upload_max_filesize in php.ini.
 2 |  UPLOAD_ERR_FORM_SIZE |  Size exceeds MAX_FILE_SIZE specified in HTML form.
 3 |  UPLOAD_ERR_PARTIAL |  The uploaded file was only partially uploaded.
 4 |  UPLOAD_ERR_NO_FILE |  No file was uploaded.
  5   |   UPLOAD_ERROR_E   |  As explained by @Progman, removed in rev.  81792
 6 |  UPLOAD_ERR_NO_TMP_DIR |  Missing a temporary folder.
 7 |  UPLOAD_ERR_CANT_WRITE |  Failed to write file to disk.
 8 |  UPLOAD_ERR_EXTENSION |  File upload stopped by extension.
+7
php file-upload
source share
1 answer

It doesn’t matter, since you use the UPLOAD_ERR_* constants anyway. But I think field 5 was an error, which is now handled by another error case.

Edit

Case "5" was an error for empty uploaded files. However, this is not an error, so the field / constant is deleted. See changeet 81792 on the main / rfc 1867.c and changeet 88408 on the main / rfc1867.c

+9
source share

All Articles