client icon indicating copy to clipboard operation
client copied to clipboard

Fix: Support string input for $contents in Exception constructor

Open sterzuccio opened this issue 11 months ago • 1 comments

What:

  • [x] Bug Fix
  • [ ] New Feature

Description:

Fix: Handle cases where $contents is a string instead of an array. Updated constructor to support both array and string types, preventing errors when $contents is not an array.

Related:

sterzuccio avatar Jan 21 '25 08:01 sterzuccio

Marking as draft due to CI failures.

iBotPeaches avatar Apr 08 '25 23:04 iBotPeaches

This was fixed in https://github.com/openai-php/client/pull/643 as it was refactored for object or string/object calls (to account for audio stringable responses). This shouldn't occur anymore since path of string returns won't have this possibility anymore.

iBotPeaches avatar Aug 21 '25 01:08 iBotPeaches