Skip to content

Commit 0cc6340

Browse files
committed
Fix error after #17819 merge
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
1 parent 6647365 commit 0cc6340

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

libraries/classes/Controllers/Table/TrackingController.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ public function __invoke(ServerRequest $request): void
111111
);
112112

113113
$logType = $request->getParsedBodyParam('logtype', 'schema_and_data');
114+
if (! isset($_POST['logtype'])) {
115+
$_POST['logtype'] = 'schema_and_data';
116+
}
114117

115118
if ($logType === 'schema') {
116119
$GLOBALS['selection_schema'] = true;
@@ -122,10 +125,21 @@ public function __invoke(ServerRequest $request): void
122125

123126
/** @var string $dateFrom */
124127
$dateFrom = $request->getParsedBodyParam('date_from', $GLOBALS['data']['date_from']);
128+
if (! isset($_POST['date_from'])) {
129+
$_POST['date_from'] = $GLOBALS['data']['date_from'];
130+
}
131+
125132
/** @var string $dateTo */
126133
$dateTo = $request->getParsedBodyParam('date_to', $GLOBALS['data']['date_to']);
134+
if (! isset($_POST['date_to'])) {
135+
$_POST['date_to'] = $GLOBALS['data']['date_to'];
136+
}
137+
127138
/** @var string $users */
128139
$users = $request->getParsedBodyParam('users', '*');
140+
if (! isset($_POST['users'])) {
141+
$_POST['users'] = '*';
142+
}
129143

130144
$GLOBALS['filter_ts_from'] = strtotime($dateFrom);
131145
$GLOBALS['filter_ts_to'] = strtotime($dateTo);

psalm-baseline.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4189,11 +4189,13 @@
41894189
<code>$GLOBALS['data']</code>
41904190
<code>$version</code>
41914191
</MixedArgument>
4192-
<MixedArrayAccess occurrences="2">
4192+
<MixedArrayAccess occurrences="4">
41934193
<code>$GLOBALS['data']['date_from']</code>
4194+
<code>$GLOBALS['data']['date_from']</code>
4195+
<code>$GLOBALS['data']['date_to']</code>
41944196
<code>$GLOBALS['data']['date_to']</code>
41954197
</MixedArrayAccess>
4196-
<MixedAssignment occurrences="17">
4198+
<MixedAssignment occurrences="19">
41974199
<code>$GLOBALS['data']</code>
41984200
<code>$GLOBALS['data']</code>
41994201
<code>$GLOBALS['entries']</code>
@@ -4205,6 +4207,8 @@
42054207
<code>$GLOBALS['selection_both']</code>
42064208
<code>$GLOBALS['selection_data']</code>
42074209
<code>$GLOBALS['selection_schema']</code>
4210+
<code>$_POST['date_from']</code>
4211+
<code>$_POST['date_to']</code>
42084212
<code>$logType</code>
42094213
<code>$reportExport</code>
42104214
<code>$selectedVersions</code>

0 commit comments

Comments
 (0)