max(): Argument #1 ($value) must contain at least one element
#0 /var/www/edelves.ru/benzin/app/controllers/CategoriesController.php(587): max()
#1 [internal function]: CategoriesController->subcategoryAction()
#2 [internal function]: Phalcon\Dispatcher\AbstractDispatcher->callActionMethod()
#3 [internal function]: Phalcon\Dispatcher\AbstractDispatcher->dispatch()
#4 /var/www/edelves.ru/benzin/public/index.php(29): Phalcon\Mvc\Application->handle()
#5 {main}