Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type safety within arrays should not throw exceptions #49

Closed
g105b opened this issue Feb 14, 2025 · 2 comments
Closed

Type safety within arrays should not throw exceptions #49

g105b opened this issue Feb 14, 2025 · 2 comments

Comments

@g105b
Copy link
Member

g105b commented Feb 14, 2025

In the examples, $obj->getInt("pi"); shows how the type-safe getter automatically casts the data, but then goes on to show how $obj->getArray("arrayOfData", "int") throws an error if the array is not all ints. This is inconsistent.

@g105b
Copy link
Member Author

g105b commented Feb 14, 2025

@rena-ertam028 how interesting that your AI could produce what looks to be a suitable solution in just a few minutes. Are you doing this across the whole of Github, or do you have any particular interest in PHP.Gt repositories?

g105b added a commit that referenced this issue Feb 14, 2025
g105b added a commit that referenced this issue Feb 14, 2025
@g105b g105b closed this as completed in 534b593 Feb 14, 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

No branches or pull requests

2 participants
@g105b and others