Fix rider optimization issue when jo count for hub is 0 #589

This commit is contained in:
Kendrick Chan 2021-06-18 21:20:33 +08:00
parent c47bd0e882
commit 46cc089f48

View file

@ -466,6 +466,12 @@ class AnalyticsController extends Controller
$ids[] = $jo['id'];
}
// no jos, so no battery
if (count($ids) <= 0)
{
return 0;
}
// ideally we encode the ids, but right now we're assuming they'll be int
$in_text = implode(',', $ids);