Authored by Rock Zhang

修复当接口返回的品类数据为空时,搜索列表会报错的bug

Code Review By Rock Zhang
... ... @@ -113,6 +113,11 @@ class SearchController extends AbstractAction
$classNames = Category\ClassModel::getClassNames();
do {
// 品类名称为空时跳出
if (empty($classNames)) {
break;
}
/* 精确查一级品类 */
$sorts = array_keys($classNames['first'], $query, true);
if (isset($sorts[0])) {
... ...