diff options
-rw-r--r-- | apps/federatedfilesharing/lib/FederatedShareProvider.php | 4 | ||||
-rw-r--r-- | apps/sharebymail/lib/ShareByMailProvider.php | 4 | ||||
-rw-r--r-- | lib/public/AppFramework/Db/QBMapper.php | 2 |
3 files changed, 3 insertions, 7 deletions
diff --git a/apps/federatedfilesharing/lib/FederatedShareProvider.php b/apps/federatedfilesharing/lib/FederatedShareProvider.php index fe814284fb6..cd0ad49b6a5 100644 --- a/apps/federatedfilesharing/lib/FederatedShareProvider.php +++ b/apps/federatedfilesharing/lib/FederatedShareProvider.php @@ -393,9 +393,7 @@ class FederatedShareProvider implements IShareProvider { $qb->setValue('file_target', $qb->createNamedParameter('')); $qb->execute(); - $id = $qb->getLastInsertId(); - - return (int)$id; + return $qb->getLastInsertId(); } /** diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php index 03e46c8e021..2484ccdd720 100644 --- a/apps/sharebymail/lib/ShareByMailProvider.php +++ b/apps/sharebymail/lib/ShareByMailProvider.php @@ -690,9 +690,7 @@ class ShareByMailProvider implements IShareProvider { $qb->setValue('file_target', $qb->createNamedParameter('')); $qb->execute(); - $id = $qb->getLastInsertId(); - - return (int)$id; + return $qb->getLastInsertId(); } /** diff --git a/lib/public/AppFramework/Db/QBMapper.php b/lib/public/AppFramework/Db/QBMapper.php index 72373ba26c3..8c324d9c601 100644 --- a/lib/public/AppFramework/Db/QBMapper.php +++ b/lib/public/AppFramework/Db/QBMapper.php @@ -136,7 +136,7 @@ abstract class QBMapper { if ($entity->id === null) { // When autoincrement is used id is always an int - $entity->setId((int)$qb->getLastInsertId()); + $entity->setId($qb->getLastInsertId()); } return $entity; |