spree/spree — pull request #2927 by Maxim-Filimonov (2013-04-23 11:23:04+00:00)
Title: Comparison of String with nil failed in ProductFilters.brand_filter

Encountered an error on my spree 1.3.0 instance.
ActionView::Template::Error (comparison of String with nil failed):
3: <%= form_tag '', :method => :get, :id => 'sidebar_products_search' do %>
1: <% filters = @taxon ? @taxon.applicable_filters : [Spree::ProductFilters.all_taxons] %>
2: <% unless filters.empty? %>
4: <% params[:search] ||= {} %>

Tried to update to 1.3.2 didn't help. After some investigation found that if brand is set to nil product_filter fails with the exception.
Test and fix attached.