We've had a few reports of two seasons on the same show both showing up as "season 1", which goes away once the cache is bopped. Here's my hunch as to what's happening:
when MyRadio_Season::getInstance is called, before allocate() is called, it computes season_num through SQL:
(
SELECT COUNT(*) FROM schedule.show_season
WHERE show_id=(SELECT show_id FROM schedule.show_season WHERE show_season_id=$1)
AND show_season_id<=$1
AND show_season_id IN (SELECT show_season_id FROM schedule.show_season_timeslot)
) AS season_num
At this point, the unallocated season has a season_num of the last allocated one.
MyRadio_Season->allocate() is called, which schedules timeslots, _but does not update season_num_
The object is written back to the cache, with the incorrect season_num.
The fix is likely to re-compute season_num in allocate().
We've had a few reports of two seasons on the same show both showing up as "season 1", which goes away once the cache is bopped. Here's my hunch as to what's happening:
MyRadio_Season::getInstance
is called, beforeallocate()
is called, it computesseason_num
through SQL:At this point, the unallocated season has a season_num of the last allocated one.
MyRadio_Season->allocate()
is called, which schedules timeslots, _but does not updateseason_num
_season_num
.The fix is likely to re-compute
season_num
inallocate()
.For #1054.