From ec0e2e1b4a4c155e30a05972bf559ec1be2cf94d Mon Sep 17 00:00:00 2001 From: sshakndr Date: Mon, 17 Mar 2025 14:24:50 +0700 Subject: [PATCH] fix(php): correct version author when changes exist. Fix Bug 73505 --- web/documentserver-example/php/src/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/documentserver-example/php/src/functions.php b/web/documentserver-example/php/src/functions.php index 1f1b78cd..6e25d6d2 100644 --- a/web/documentserver-example/php/src/functions.php +++ b/web/documentserver-example/php/src/functions.php @@ -968,7 +968,7 @@ function getHistory($filename, $filetype, $docKey, $fileuri, $isEnableDirectUrl) if ($i > 1) { // check if the version number is greater than 1 (the document was modified) $changes = json_decode(file_get_contents(getVersionDir($histDir, $i - 1) . DIRECTORY_SEPARATOR . "changes.json"), true); // get the path to the changes.json file - $change = $changes["changes"][0]; + $change = $changes["changes"][count($changes["changes"]) - 1]; // write information about changes to the object $obj["changes"] = $changes ? $changes["changes"] : null;