Fix location_code filter: handle empty string and trim whitespace
This commit is contained in:
@@ -169,8 +169,10 @@ class RealtimeController
|
||||
}
|
||||
|
||||
$locationCode = $queryParams['location_code'] ?? null;
|
||||
if ($locationCode !== null && !is_string($locationCode)) {
|
||||
if ($locationCode !== null && (!is_string($locationCode) || trim($locationCode) === '')) {
|
||||
$locationCode = null;
|
||||
} else if ($locationCode !== null) {
|
||||
$locationCode = trim($locationCode);
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user