Fix of hard error in search function

Function is still not returning results however when finding by attribute. E.g. 
$product = Product::model()->find('externalProductId=11');
returns zero results even though the DB has that record.