Skip to content

Commit 327ec9c

Browse files
committed
fix(card): use accessor for createdAt in VTODO serialization
CardDetails extends Card and keeps its own default entity properties. Direct property access can therefore read null from the wrapper while the magic getter delegates through __call() to the inner Card. That can crash any code path serializing a Card-like object with a due date via getCalendarObject(), not only CalDAV PUT handling. Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
1 parent 48e6628 commit 327ec9c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/Db/Card.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public function getCalendarObject(): VCalendar {
136136
$event->UID = 'deck-card-' . $this->getId();
137137
if ($this->getDuedate()) {
138138
$creationDate = new DateTime();
139-
$creationDate->setTimestamp($this->createdAt);
139+
$creationDate->setTimestamp($this->getCreatedAt());
140140
$event->DTSTAMP = $creationDate;
141141
$event->DUE = new DateTime($this->getDuedate()->format('c'), new DateTimeZone('UTC'));
142142
}

0 commit comments

Comments
 (0)