burnbright/silverstripe-shop — pull request #188 by markguinn (2013-10-16 11:20:42+00:00)
Title: Fix to popularity calculation returns null if product was bought today.

If a product was purchased on the same day as the task is run, `DATEDIFF(NOW(),Order.Paid)` returns 0, resulting in a div-by-zero error.