mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-02-10 18:05:10 +08:00
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:
@ -676,7 +676,7 @@ function restore()
|
||||
|
||||
if ($url) {
|
||||
$data = file_get_contents(
|
||||
$url,
|
||||
getCorrectUrl($url),
|
||||
false,
|
||||
stream_context_create(["http" => ["timeout" => 5]])
|
||||
);
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user