Skip to content

Fix execCreate() to send numeric $user as string - #104

Merged
clue merged 1 commit into
clue:1.xfrom
clue-labs:exec-user
Oct 18, 2026
Merged

clue merged 1 commit into
clue:1.xfrom
clue-labs:exec-user

Conversation

@clue

@clue clue commented Oct 18, 2026

Copy link
Copy Markdown
Owner

This changeset fixes execCreate() to send a numeric $user as string. The $user parameter accepts a string|int, but a numeric user ID such as 1000 was sent as a JSON number, which Docker rejects with 400 Bad Request. This has been broken since the parameter was added in #39 (2016), passing the user ID as a string such as '1000' worked as a workaround.

Builds on top of #39

@clue clue added the bug Something isn't working label Oct 18, 2026
@clue clue added this to the v1.7.0 milestone Oct 18, 2026
@clue
clue requested a balanced review from Copilot October 18, 2026 01:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused fix preserves string inputs and includes targeted regression coverage, with no unresolved issues.

No open issues 🎉

What changed in this PR

Fixes execCreate() so integer user IDs are serialized as strings, avoiding Docker’s 400 Bad Request response.

Changes:

  • Casts $user to a string before JSON serialization.
  • Adds a regression test verifying integer 1000 is sent as "1000".
File Description
tests/​ClientTest.php Adds numeric user ID regression coverage.
src/​Client.php Serializes the exec user as a string.

Review effort: Balanced

@clue
clue merged commit 7287e72 into clue:1.x Oct 18, 2026
15 checks passed
@clue
clue deleted the exec-user branch October 18, 2026 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants