Commit 363084d4 authored by epriestley's avatar epriestley
Browse files

Fix an issue where setting a recurrence end date on a Calendar event without one could fatal

Summary: Ref T11816. The underlying format of recurrence end dates swapped around a bit and we now try to compare `null` to a valid date if you're setting it for the first time.

Test Plan:
  - On a new event, set a recurrence end date.
  - Then, removed a recurrence end date.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11816

Differential Revision:
parent 5ff02058
......@@ -23,6 +23,14 @@ abstract class PhabricatorCalendarEventDateTransaction
public function getTransactionHasEffect($object, $old, $new) {
// If either value is `null` (for example, when setting a recurring event
// end date for the first time) and the other value is not `null`, this
// transaction has an effect.
$has_null = (($old === null) || ($new === null));
if ($has_null) {
return ($old !== $new);
$editor = $this->getEditor();
$actor = $this->getActor();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment