Skip to content

Conversation

@Natshah
Copy link

@Natshah Natshah commented Dec 30, 2025

What:

  • Bug Fix
  • New Feature

Description:

Related:

@iBotPeaches
Copy link
Collaborator

thanks! A lot of the strict typing never expects null there so you'll see the test suite is not accounting for this discrepancy.

@Natshah Natshah changed the title HP 8.4 compatibility: Fix TypeError when API returns null for results array PHP 8.4 compatibility: Fix TypeError when API returns null for results array Dec 30, 2025
@iBotPeaches
Copy link
Collaborator

Are you experiencing this with OpenAI or some 3rd party workaround? Confused as I heavily use this moderation endpoint and never experience this.

@Natshah
Copy link
Author

Natshah commented Dec 30, 2025

Thanks, Connor, for follow up on the PHP 8.4 issue.

Using this with the Drupal AI integration module with Drupal
And the OpenAI Provider

OpenAI\Responses\Moderations\CreateResponse::from() (Line: 30)
OpenAI\Resources\Moderations->create() (Line: 726)
Drupal\ai_provider_openai\Plugin\AiProvider\OpenAiProvider->moderationEndpoints() (Line: 350)
Drupal\ai_provider_openai\Plugin\AiProvider\OpenAiProvider->chat()
ReflectionMethod->invokeArgs() (Line: 269)
Drupal\ai\Plugin\ProviderProxy->wrapperCall() (Line: 133)
Drupal\ai\Plugin\ProviderProxy->__call() (Line: 149)
Drupal\ai_ckeditor\Controller\AiRequest->doRequest()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->{closure:Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber::wrapControllerExecutionInRenderContext():121}() (Line: 634)

Doing number of testing rounds, ( Automated Functional Testing )

@Natshah Natshah changed the title PHP 8.4 compatibility: Fix TypeError when API returns null for results array fix: PHP 8.4 compatibility - TypeError when API returns null for results array Dec 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants