Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2022-04-14 14:18:38 +0300
committerGitHub <noreply@github.com>2022-04-14 14:18:38 +0300
commite4b68e4b37c5aed60b4fe68efeca320192727933 (patch)
treec6f4425c26d554e699e7779d510cb4d0cfe6bac9 /apps
parentea3a9ba86eba31bc127ea91fa706546d991f4984 (diff)
parenta737a2561bb9ef7a71e9633bb6abacb7b0beaedb (diff)
Merge pull request #31521 from nextcloud/backport/31491/stable23
[stable23] Fix duplicated UUID detection when there are empty uuids
Diffstat (limited to 'apps')
-rw-r--r--apps/user_ldap/lib/Mapping/AbstractMapping.php6
-rw-r--r--apps/user_ldap/lib/Migration/Version1130Date20211102154716.php4
-rw-r--r--apps/workflowengine/lib/Manager.php2
-rw-r--r--apps/workflowengine/lib/Migration/PopulateNewlyIntroducedDatabaseFields.php2
4 files changed, 7 insertions, 7 deletions
diff --git a/apps/user_ldap/lib/Mapping/AbstractMapping.php b/apps/user_ldap/lib/Mapping/AbstractMapping.php
index 16973f76ff4..1a747cc8bfd 100644
--- a/apps/user_ldap/lib/Mapping/AbstractMapping.php
+++ b/apps/user_ldap/lib/Mapping/AbstractMapping.php
@@ -438,14 +438,14 @@ abstract class AbstractMapping {
$picker = $this->dbc->getQueryBuilder();
$picker->select('owncloud_name')
->from($this->getTableName());
- $cursor = $picker->execute();
+ $cursor = $picker->executeQuery();
$result = true;
- while ($id = $cursor->fetchOne()) {
+ while (($id = $cursor->fetchOne()) !== false) {
$preCallback($id);
if ($isUnmapped = $this->unmap($id)) {
$postCallback($id);
}
- $result &= $isUnmapped;
+ $result = $result && $isUnmapped;
}
$cursor->closeCursor();
return $result;
diff --git a/apps/user_ldap/lib/Migration/Version1130Date20211102154716.php b/apps/user_ldap/lib/Migration/Version1130Date20211102154716.php
index 9e9554000d8..024c5801582 100644
--- a/apps/user_ldap/lib/Migration/Version1130Date20211102154716.php
+++ b/apps/user_ldap/lib/Migration/Version1130Date20211102154716.php
@@ -259,7 +259,7 @@ class Version1130Date20211102154716 extends SimpleMigrationStep {
$result = $select->executeQuery();
$idList = [];
- while ($id = $result->fetchOne()) {
+ while (($id = $result->fetchOne()) !== false) {
$idList[] = $id;
}
$result->closeCursor();
@@ -278,7 +278,7 @@ class Version1130Date20211102154716 extends SimpleMigrationStep {
->having($select->expr()->gt($select->func()->count('owncloud_name'), $select->createNamedParameter(1)));
$result = $select->executeQuery();
- while ($uuid = $result->fetchOne()) {
+ while (($uuid = $result->fetchOne()) !== false) {
yield $uuid;
}
$result->closeCursor();
diff --git a/apps/workflowengine/lib/Manager.php b/apps/workflowengine/lib/Manager.php
index 178bc87365b..34dbf507b91 100644
--- a/apps/workflowengine/lib/Manager.php
+++ b/apps/workflowengine/lib/Manager.php
@@ -351,7 +351,7 @@ class Manager implements IManager {
$result = $qb->execute();
$this->operationsByScope[$scopeContext->getHash()] = [];
- while ($opId = $result->fetchOne()) {
+ while (($opId = $result->fetchOne()) !== false) {
$this->operationsByScope[$scopeContext->getHash()][] = (int)$opId;
}
$result->closeCursor();
diff --git a/apps/workflowengine/lib/Migration/PopulateNewlyIntroducedDatabaseFields.php b/apps/workflowengine/lib/Migration/PopulateNewlyIntroducedDatabaseFields.php
index 019d3ae6bcc..974793e99b2 100644
--- a/apps/workflowengine/lib/Migration/PopulateNewlyIntroducedDatabaseFields.php
+++ b/apps/workflowengine/lib/Migration/PopulateNewlyIntroducedDatabaseFields.php
@@ -57,7 +57,7 @@ class PopulateNewlyIntroducedDatabaseFields implements IRepairStep {
$qb = $this->dbc->getQueryBuilder();
$insertQuery = $qb->insert('flow_operations_scope');
- while ($id = $ids->fetchOne()) {
+ while (($id = $ids->fetchOne()) !== false) {
$insertQuery->values(['operation_id' => $qb->createNamedParameter($id), 'type' => IManager::SCOPE_ADMIN]);
$insertQuery->execute();
}