-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Fix column/property types in CalDAV #30438
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
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
miaulalala
left a comment
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 <[email protected]>
Signed-off-by: Christoph Wurst <[email protected]>
Signed-off-by: Christoph Wurst <[email protected]>
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