CC-5082: Repeating shows "disappear" when switching calendar to next month

We were trying to call a function on an object that was not set
This commit is contained in:
denise 2013-05-01 14:40:33 -04:00
parent 5ba5864d8c
commit ded8ceb86b
1 changed files with 7 additions and 1 deletions

View File

@ -778,6 +778,12 @@ SQL;
*/
private function createNonRepeatingInstance($showDay, $populateUntil)
{
if (isset($this->ccShow)) {
$showId = $this->ccShow->getDbId();
} else {
$showId = $showDay["show_id"];
}
//DateTime object
$start = $showDay->getLocalStartDateAndTime();
@ -789,7 +795,7 @@ SQL;
if ($this->isUpdate) {
$ccShowInstance = $this->getInstance($utcStartDateTime);
}
$ccShowInstance->setDbShowId($this->ccShow->getDbId());
$ccShowInstance->setDbShowId($showId);
$ccShowInstance->setDbStarts($utcStartDateTime);
$ccShowInstance->setDbEnds($utcEndDateTime);
$ccShowInstance->setDbRecord($showDay->getDbRecord());