Add condition to avoid fatal error see BT#7058

1.10.x
Julio Montoya 10 years ago
parent b489e29fa2
commit b61a6b8c8d
  1. 26
      main/wiki/wiki.inc.php

@ -5271,14 +5271,28 @@ class Wiki
api_replace_dangerous_char($data['reflink']),
'html'
);
$convertedFile = $dataFileSystem->transcode($filePath, $format);
DocumentManager::file_send_for_download(
$convertedFile,
false,
$data['title'].'.'.$format
);
$try = true;
while ($try) {
try {
$convertedFile = $dataFileSystem->transcode(
$filePath,
$format
);
$try = false;
DocumentManager::file_send_for_download(
$convertedFile,
false,
$data['title'].'.'.$format
);
} catch (Exception $e) {
}
}
}
return false;
}
}

Loading…
Cancel
Save