fix: Make Ajax::$action property nullable to handle missing POST parameter (#2066)

## Problem
When calling ajax.php without passing the 'action' parameter, PHP throws a TypeError:
`Cannot assign null to property TorrentPier\Ajax::$action of type string`

## Solution
Changed the `$action` property type from `string` to `?string` to allow null values when the POST parameter is not provided.

## Changes
- Changed `public string $action;` to `public ?string $action;`
This commit is contained in:
Roman Kelesidis 2025-07-30 18:59:02 +03:00 committed by GitHub
commit efd85eef4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -50,7 +50,7 @@ class Ajax
'index_data' => ['guest'],
];
public string $action;
public ?string $action;
/**
* Constructor