}
} catch (UniqueConstraintViolationException $e) {
// entry exists already
+ if ($this->connection->inTransaction()) {
+ $this->connection->commit();
+ $this->connection->beginTransaction();
+ }
}
// The file was created in the mean time
$sourceId = $sourceData['fileid'];
$newParentId = $this->getParentId($targetPath);
- list($sourceStorageId, $sourcePath) = $sourceCache->getMoveInfo($sourcePath);
- list($targetStorageId, $targetPath) = $this->getMoveInfo($targetPath);
+ [$sourceStorageId, $sourcePath] = $sourceCache->getMoveInfo($sourcePath);
+ [$targetStorageId, $targetPath] = $this->getMoveInfo($targetPath);
if (is_null($sourceStorageId) || $sourceStorageId === false) {
throw new \Exception('Invalid source storage id: ' . $sourceStorageId);
->whereParent($id);
if ($row = $query->execute()->fetch()) {
- list($sum, $min) = array_values($row);
+ [$sum, $min] = array_values($row);
$sum = 0 + $sum;
$min = 0 + $min;
if ($min === -1) {