Skip to content

Commit

Permalink
fix: TypeError in Filters
Browse files Browse the repository at this point in the history
TypeError: urldecode(): Argument #1 ($string) must be of type string, null given
  • Loading branch information
kenjis committed Mar 30, 2024
1 parent 96ce795 commit 492425a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion system/Filters/Filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,8 @@ private function setToolbarToLast(array $filters, bool $remove = false): array
*
* @param string|null $uri URI path relative to baseURL (all lowercase)
*
* @TODO We don't need to accept null as $uri.
*
* @return Filters
*/
public function initialize(?string $uri = null)
Expand All @@ -385,7 +387,7 @@ public function initialize(?string $uri = null)
}

// Decode URL-encoded string
$uri = urldecode($uri);
$uri = urldecode($uri ?? '');

$oldFilterOrder = config(Feature::class)->oldFilterOrder ?? false;
if ($oldFilterOrder) {
Expand Down

0 comments on commit 492425a

Please sign in to comment.