You are here

function _cleanup_object in Easychart 7.3

1 call to _cleanup_object()
easychart_update_7300 in ./easychart.install
Cleanup the config object.

File

./easychart.install, line 124
Easychart install file.

Code

function _cleanup_object($config) {
  foreach ($config as $key => $item) {
    if (is_object($item) || is_array($item)) {
      $arr = (array) $item;
      if (empty($arr)) {
        unset($config->{$key});
      }
      else {
        _cleanup_object($item);
      }
    }
  }
}