Skip to content

Commit 6a4f3d2

Browse files
authored
Merge pull request #6095 from LibreSign/fix/optional-parameter-before-required
fix: correct parameter order in getUserConfigByKey method
2 parents a8bb48e + d3fde80 commit 6a4f3d2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/Service/AccountService.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,14 +198,14 @@ public function getConfig(?IUser $user = null): array {
198198
$info['id_docs_sort'] = $this->getUserConfigIdDocsSort($user);
199199
$info['crl_filters'] = $this->getUserConfigCrlFilters($user);
200200
$info['crl_sort'] = $this->getUserConfigCrlSort($user);
201-
$info['grid_view'] = $this->getUserConfigByKey($user, 'grid_view') === '1';
201+
$info['grid_view'] = $this->getUserConfigByKey('grid_view', $user) === '1';
202202

203203
return array_filter($info);
204204
}
205205

206206
public function getConfigFilters(?IUser $user = null): array {
207-
$info['filter_modified'] = $this->getUserConfigByKey($user, 'filter_modified');
208-
$info['filter_status'] = $this->getUserConfigByKey($user, 'filter_status');
207+
$info['filter_modified'] = $this->getUserConfigByKey('filter_modified', $user);
208+
$info['filter_status'] = $this->getUserConfigByKey('filter_status', $user);
209209

210210
return $info;
211211
}
@@ -246,7 +246,7 @@ public function hasSignatureFile(?IUser $user = null): bool {
246246
}
247247
}
248248

249-
private function getUserConfigByKey(?IUser $user = null, string $key): string {
249+
private function getUserConfigByKey(string $key, ?IUser $user = null): string {
250250
if (!$user) {
251251
return '';
252252
}

0 commit comments

Comments
 (0)