Unverified Commit bd645890 authored by Alexandre Goldstein's avatar Alexandre Goldstein Committed by Jerome Boucher
Browse files

Merge branch 'fix/16868_unexpected_log_return_in_search' into 'develop'

fix/16868 : add try/catch when no logs are retrieved in log search

See merge request !663
parent f0c93ce7
Pipeline #12213 failed with stages
in 43 seconds
......@@ -222,12 +222,21 @@ class log implements archiveDescriptionInterface
}
}
if (!is_null($description)) {
$queryString .= $description;
}
$archiveController = \laabs::newController('recordsManagement/archive');
$archives = [];
$sortBy = ">fromDate";
$logs = $this->sdoFactory->find("recordsManagement/log", $queryString, [], $sortBy, 0, $maxResults);
try {
$logs = $this->sdoFactory->find("recordsManagement/log", $queryString, [], $sortBy, 0, $maxResults);
} catch (\Exception $e) {
return [];
}
foreach ($logs as $log) {
try {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment