Skip to content

Instantly share code, notes, and snippets.

@rafinskipg
Created November 6, 2012 00:55
Show Gist options
  • Save rafinskipg/4021694 to your computer and use it in GitHub Desktop.
Save rafinskipg/4021694 to your computer and use it in GitHub Desktop.
The stupid patch to core entity for drupal 7.15
if(!empty($ids)){
$ids2 = array_filter($ids);
if(!is_null($ids2)){
$ids2 = array_filter($ids2, 'is_string');
}
if(!is_null($ids2)){
$ids2 = array_filter($ids2, 'strlen');
}
}else{
$ids2 = array();
}
$passed_ids = !empty($ids2) ? array_flip($ids2) : FALSE;
//$passed_ids = !empty($ids) ? array_flip($ids) : FALSE;
LINE 178 : Solves the "warning array_flip .. blah blah"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment