-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix column/property types in CalDAV #30438
Conversation
/backport to stable23 |
/backport to stable22 |
foreach ($this->propertyMap as $xmlName => [$dbName, $type]) { | ||
$value = $row[$dbName]; | ||
if ($value !== null) { | ||
settype($value, $type); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we handle settype
returning false
? Throw/log something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also don't handle it in \OCP\AppFramework\Db\Entity::setter
, so I'm not sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I created and deleted calendar events and calendar recurrences.
StatAna isn't happy.
eea8d01
to
2b4c91e
Compare
Drone failure unrelated. |
2b4c91e
to
a7ad376
Compare
/rebase |
The timestamp is an int, but we treated it as string. With this patch the property map is enriched with types and settype casts the value if necessary. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
a7ad376
to
288f07a
Compare
The timestamp and the calendar order are int, but we treated them as string. With this patch
the property map is enriched with types and settype casts the value if necessary.
Ideally we migrate this DB access code to something like a QBMapper. Then these things will be taken care of for us automagically. But that is for another day.
Discovered in #30437