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.
php file-upload
Majid fouladpour
source share