function _value_is_get_file_error in Value is 7
Helper to get a file's error code. This requires logic, because a file can be a list of files.
1 call to _value_is_get_file_error()
- _value_is_file_element_process in ./
value_is.module - Process callback for file input elements.
File
- ./
value_is.module, line 46 - All the element validators for #element_validate.
Code
function _value_is_get_file_error($file) {
if (isset($file[0])) {
return isset($file[0]['error']) ? $file[0]['error'] : -1;
}
return isset($file['error']) ? $file['error'] : -1;
}