2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
// UPLOAD_ERR_INI_SIZE: File size exceeded php.ini value
case1:
// UPLOAD_ERR_FORM_SIZE: File size exceeded MAX_FILE_SIZE form value
case2:
caseUPLOAD_ERR_INI_SIZE:
caseUPLOAD_ERR_FORM_SIZE:
drupal_set_message(t('The file %file could not be saved, because it exceeds the maximum allowed size for uploads.',array('%file'=>theme('placeholder',$source))),'error');
return0;
// UPLOAD_ERR_PARTIAL: File was only partially uploaded
case3:
// UPLOAD_ERR_NO_FILE: No file was uploaded
case4:
caseUPLOAD_ERR_PARTIAL:
caseUPLOAD_ERR_NO_FILE:
drupal_set_message(t('The file %file could not be saved, because the upload did not complete.',array('%file'=>theme('placeholder',$source))),'error');