Skip to content

Fix 'TypeError: is_nan(): Argument #1 ($num) must be of type float, string given' #2

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

Merged
merged 1 commit into from
Apr 26, 2023

Conversation

DieterHolvoet
Copy link

phayes#187 introduced an issue when passing strings to the Point constructor, which is valid since the $x, $y and $z argument are typed as numeric. is_nan() expects float arguments, so we should cast strings to floats before using that function.

@ocean
Copy link

ocean commented Apr 19, 2023

@itamair I'm just hitting this issue as well, nice fix @DieterHolvoet 👍

Copy link
Owner

@itamair itamair left a comment

Choose a reason for hiding this comment

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

LGTM

@itamair itamair merged commit 645f326 into itamair:master Apr 26, 2023
DieterHolvoet added a commit to DieterHolvoet/geoPHP that referenced this pull request Aug 9, 2024
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

Successfully merging this pull request may close these issues.

3 participants