diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2021-02-15 20:50:28 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2021-02-15 20:50:28 +0100 |
commit | df4c2508d64822e448bf2f8b9e4c84d4877c4725 (patch) | |
tree | b917abbd59a29f2fa6b51c77f7252d74b9887586 /apps/dav | |
parent | c45dc502ca77c3d6ea44e5594e15d393364c34ee (diff) | |
download | nextcloud-server-df4c2508d64822e448bf2f8b9e4c84d4877c4725.tar.gz nextcloud-server-df4c2508d64822e448bf2f8b9e4c84d4877c4725.zip |
Fix some RedundantCast in dav code
For #25641
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/CalDAV/CalDavBackend.php | 4 | ||||
-rw-r--r-- | apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index 0cceeae12dc..6b84512fc93 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -2158,10 +2158,10 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription ->values($valuesToInsert) ->execute(); - $subscriptionId = $this->db->lastInsertId('*PREFIX*calendarsubscriptions'); + $subscriptionId = $query->getLastInsertId(); $subscriptionRow = $this->getSubscriptionById($subscriptionId); - $this->dispatcher->dispatchTyped(new SubscriptionCreatedEvent((int)$subscriptionId, $subscriptionRow)); + $this->dispatcher->dispatchTyped(new SubscriptionCreatedEvent($subscriptionId, $subscriptionRow)); $this->legacyDispatcher->dispatch('\OCA\DAV\CalDAV\CalDavBackend::createSubscription', new GenericEvent( '\OCA\DAV\CalDAV\CalDavBackend::createSubscription', [ diff --git a/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php b/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php index 6e45affb3fe..e25f42c31e7 100644 --- a/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php +++ b/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php @@ -130,7 +130,7 @@ class AppleProvisioningPlugin extends ServerPlugin { $absoluteURL = $this->urlGenerator->getBaseUrl(); $parsedUrl = parse_url($absoluteURL); if (isset($parsedUrl['port'])) { - $serverPort = (int) $parsedUrl['port']; + $serverPort = $parsedUrl['port']; } else { $serverPort = 443; } |