fix: PHP 8.4 compatibility - TypeError when API returns null for results array #725
Annotations
6 errors
|
|
|
Type Checks
The operation was canceled.
|
|
Type Checks:
src/Responses/Moderations/CreateResponse.php#L61
Method OpenAI\Responses\Moderations\CreateResponse::toArray() should return array{id: string, model: string, results: array<int, array{categories: array<string, bool>, category_scores: array<string, float>, flagged: bool, category_applied_input_types?: array<string, array<int, string>>}>} but returns array{id: string|null, model: string|null, results: array<int, array{categories: array<string, bool>, category_scores: array<string, float>, flagged: bool, category_applied_input_types?: array<string, array<int, string>>}>}.
|
|
Type Checks:
src/Responses/Moderations/CreateResponse.php#L50
Offset 'model' on array{id: string, model: string, results: array<int, array{categories: array<string, bool>, category_scores: array<string, float>, flagged: bool, category_applied_input_types?: array<string, array<int, string>>}>} on left side of ?? always exists and is not nullable.
|
|
Type Checks:
src/Responses/Moderations/CreateResponse.php#L49
Offset 'id' on array{id: string, model: string, results: array<int, array{categories: array<string, bool>, category_scores: array<string, float>, flagged: bool, category_applied_input_types?: array<string, array<int, string>>}>} on left side of ?? always exists and is not nullable.
|
|
Type Checks:
src/Responses/Moderations/CreateResponse.php#L46
Offset 'results' on array{id: string, model: string, results: array<int, array{categories: array<string, bool>, category_scores: array<string, float>, flagged: bool, category_applied_input_types?: array<string, array<int, string>>}>} on left side of ?? always exists and is not nullable.
|
Loading