Null argument instead of array|object in searchSimilarTags() function

Created on 8 December 2024, 10 days ago

Problem/Motivation

Warning: foreach() argument must be of type array|object, null given in Drupal\ai_interpolator_openai\Plugin\AiInterPolatorFieldRules\OpenAiTaxonomy->searchSimilarTags()

Proposed resolution

Add a conditional if statement before the for loop to ensure that $data is not null.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇯🇴Jordan yasmeensalah

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024