From ecd5dc65a29170d0f2fed4ab482c8bd4e3912e80 Mon Sep 17 00:00:00 2001 From: sunhao Date: Wed, 30 Apr 2025 15:13:13 +0800 Subject: [PATCH] * [bug #62188] fix save doc content error. --- module/doc/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/doc/model.php b/module/doc/model.php index 512536d714..91f3dc0343 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -1625,7 +1625,7 @@ class docModel extends model $docContent->addedBy = $docContent->editedBy; $docContent->addedDate = $docContent->editedDate; $docContent->files = implode(',', $files); - $docContent->fromVersion = isset($docData->fromVersion) ? $docData->fromVersion : ($version - 1); + $docContent->fromVersion = isset($docData->fromVersion) ? $docData->fromVersion : max(0, ($version - 1)); $this->dao->insert(TABLE_DOCCONTENT)->data($docContent)->exec(); $docContent->id = $this->dao->lastInsertID(); }