fix: [sync] Pull filters ignored if no custom url params added, fixes #5594

pull/5615/head
iglocska 2020-02-04 15:05:50 +01:00
parent 17918f916c
commit 488b66bd59
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 4 additions and 2 deletions

View File

@ -2570,7 +2570,7 @@ class Server extends AppModel
return $final;
}
$filter_rules = json_decode($filter_rules, true);
$url_params = null;
$url_params = array();
foreach ($filter_rules as $field => $rules) {
$temp = array();
if ($field === 'url_params') {
@ -2592,7 +2592,9 @@ class Server extends AppModel
}
}
}
$final = array_merge_recursive($final, $url_params);
if (!empty($url_params)) {
$final = array_merge_recursive($final, $url_params);
}
return $final;
}