function _commerce_file_element_value_is_empty in Commerce File 7
Returns TRUE if value is considered empty
See also
2 calls to _commerce_file_element_value_is_empty()
- commerce_file_limit_duration_element_validate in includes/
commerce_file.elements.inc - FAPI element validate callback for limit integer element type.
- commerce_file_limit_integer_element_validate in includes/
commerce_file.elements.inc - FAPI element validate callback for limit textfield element type.
File
- ./
commerce_file.module, line 1519 - Provides integration of file licenses with Commerce
Code
function _commerce_file_element_value_is_empty($value) {
$is_empty_string = is_string($value) && drupal_strlen(trim($value)) == 0;
$is_empty_value = $value === 0;
return $is_empty_string || $is_empty_value;
}