Permalink
Browse files

Don't mess with the empty sting.

  • Loading branch information...
xendk committed Apr 11, 2012
1 parent 78524d1 commit 5ccd1cc86433e28ec0085e481ffceeecea1cf65b
Showing with 9 additions and 7 deletions.
  1. +9 −7 ting_search_typepicker/ting_search_typepicker.module
@@ -35,13 +35,15 @@ function ting_search_typepicker_form_ting_search_form_alter(&$form, &$form_state
}
foreach ($rows as $value){
$value = explode('|',$value);
- if (strpos($value[0], ':') === FALSE) {
- // Old style type name, change to new.
- $value[0] == 'facet.type:' . $value[0];
- }
- if (substr($value[0], -1) != ';') {
- // Ensure trailing semicolon.
- $value[0] .= ';';
+ if ($value[0] != ''){
+ if (strpos($value[0], ':') === FALSE) {
+ // Old style type name, change to new.
+ $value[0] == 'facet.type:' . $value[0];
+ }
+ if (substr($value[0], -1) != ';') {
+ // Ensure trailing semicolon.
+ $value[0] .= ';';
+ }
}
$options[$value[0]] = $value[1];
}

0 comments on commit 5ccd1cc

Please sign in to comment.