You are here

function _features_sanitize in Features 7

Same name and namespace in other branches
  1. 6 \_features_sanitize()
  2. 7.2 \_features_sanitize()

"Sanitizes" an array recursively, performing two key operations:

  • Sort an array by its keys (assoc) or values (non-assoc)
  • Remove any null or empty values for associative arrays (array_filter()).
2 calls to _features_sanitize()
features_detect_overrides in ./
Detect differences between DB and code components of a feature.
features_get_signature in ./
Wrapper around features_get_[storage] to return an md5hash of a normalized defaults/normal object array. Can be used to compare normal/default states of a module's component.


./, line 863


function _features_sanitize(&$array) {
  if (is_array($array)) {
    if (_features_is_assoc($array)) {
      $array = array_filter($array);
    else {
    foreach ($array as $k => $v) {
      if (is_array($v)) {