fix(php): replace public url in the intermediate version download link and ignore command service error code 4. Fix Bug 73526

This commit is contained in:
sshakndr
2025-03-14 13:07:29 +07:00
parent 2784c47873
commit 0a9a37e355
2 changed files with 3 additions and 3 deletions

View File

@ -676,7 +676,7 @@ function restore()
if ($url) {
$data = file_get_contents(
$url,
getCorrectUrl($url),
false,
stream_context_create(["http" => ["timeout" => 5]])
);

View File

@ -359,8 +359,8 @@ function commandRequest($method, $key, $meta = null)
if ($responseData === false) {
throw new Exception('Document Server connection error.');
}
$error = json_decode($responseData, true)['error'];
if ($error !== 0) {
$error = json_decode(html_entity_decode($responseData), true)['error'];
if ($error !== 0 && $error !== 4) {
throw new Exception('Command Service Error #'. $error);
}