Skip to content

fix: Ensure userId is string#562

Merged
kesselb merged 1 commit intomasterfrom
bug/noid/ensure-user-id-is-string
Feb 24, 2026
Merged

fix: Ensure userId is string#562
kesselb merged 1 commit intomasterfrom
bug/noid/ensure-user-id-is-string

Conversation

@kesselb
Copy link
Collaborator

@kesselb kesselb commented Feb 24, 2026

Using a numeric value like "100" as array-key automatically casts it to an integer. The type cast ensures the userId is a string as required by printRecord.

Using a numeric value like "100" as array-key automatically casts it to
an integer. The type cast ensures the userId is a string as required by
printRecord.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
@kesselb
Copy link
Collaborator Author

kesselb commented Feb 24, 2026

/backport to stable33

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a TypeError that occurs when userIds are numeric strings (e.g., "100"). PHP automatically casts numeric string array keys to integers, which causes a type mismatch when the userId is passed to the printRecord method that requires a string parameter. The fix adds an explicit string cast to ensure type safety.

Changes:

  • Added explicit string cast when passing userId to printRecord method to prevent TypeError with numeric userIds

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kesselb kesselb merged commit 8b83338 into master Feb 24, 2026
19 checks passed
@kesselb kesselb deleted the bug/noid/ensure-user-id-is-string branch February 24, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants