Skip to content

Commit

Permalink
Merge pull request #13149 from kaltura/Ursa-21.10.0-PLAT-25148
Browse files Browse the repository at this point in the history
DST error handling when offset for transition is missing
  • Loading branch information
danbar0kal authored Feb 27, 2025
2 parents a52eaa1 + d9e31ad commit 4f6ce3b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions api_v3/lib/KalturaErrors.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ class KalturaErrors extends APIErrors

const PROPERTY_VALIDATION_ALL_MUST_BE_NULL_BUT_ONE = "PROPERTY_VALIDATION_ALL_MUST_BE_NULL_BUT_ONE;PROP_NAME;Only one of the passed properties: @PROP_NAME@ should not be null";

const PROPERTY_VALIDATION_NOT_VALID = "PROPERTY_VALIDATION_UNTIL_NOT_VALID;PROP_NAME;The property \"@PROP_NAME@\" is not valid";

const PROPERTY_VALIDATION_MIN_LENGTH = "PROPERTY_VALIDATION_MIN_LENGTH;PROP_NAME,MIN_LEN;The property \"@PROP_NAME@\" must have a min length of @MIN_LEN@ characters";

const PROPERTY_VALIDATION_MAX_LENGTH = "PROPERTY_VALIDATION_MAX_LENGTH;PROP_NAME,MAX_LEN;The property \"@PROP_NAME@\" cannot have more than @MAX_LEN@ characters";
Expand Down
8 changes: 8 additions & 0 deletions plugins/schedule/base/lib/api/KalturaScheduleEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,14 @@ private function validateRecurringEventForInsert()
}

$this->validatePropertyNotNull('recurrence');
if ($this->recurrence instanceof KalturaScheduleEventRecurrence)
{
if ($this->recurrence->until && $this->recurrence->until < $this->endDate)
{
throw new KalturaAPIException(KalturaErrors::PROPERTY_VALIDATION_NOT_VALID, 'Recurrence::until');
}
}

$this->validatePropertyNotNull('duration');

}
Expand Down
2 changes: 1 addition & 1 deletion plugins/schedule/base/lib/iCal/kSchedulingICalEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ public function addVtimeZoneBlock(KalturaScheduleEvent $event = null, &$timeZone
}
}
array_unshift($relevantTransitions, $initialTransition);

// Create VTIMEZONE block content
$timeZoneBlockArray[] = $this->writeField(strtoupper(self::$timeZoneField), $this->timeZoneId);

Expand Down

0 comments on commit 4f6ce3b

Please sign in to comment.