JPBetley / pulse

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hockey schedule displaying incorrect date

eclampett opened this issue · comments

The current hockey page displays the wrong date for the next game. This is likely due to how we handle and sort the data when bringing it in from RIT's website.

Resolved by PR #76

The issue is in HockeyController the $games were being sort()'ed instead of sortBy()'ed.

The Collection::sort() method assumes the collection is single dimensional and attempts to sort based on those values.

Collection::sortBy() takes a callback and functions as we have been attempting to use sort().

Why did Laravel not throw any error regarding sort() being improperly used? It just silently failed...sad.