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

[FORG0001] Cannot cast to xs:float: undefined #8

Open
kumy opened this issue Aug 8, 2017 · 1 comment
Open

[FORG0001] Cannot cast to xs:float: undefined #8

kumy opened this issue Aug 8, 2017 · 1 comment
Assignees

Comments

@kumy
Copy link
Member

kumy commented Aug 8, 2017

From mail:

https://api.geokretymap.org/geojson?latTL=45.668331942446045&lonTL=4.157699812503082&latBR=45.848188057553955&lonBR=undefined&limit=500&daysFrom=0&daysTo=-1

<br />
<b>Fatal error</b>:  Uncaught Exception: [FORG0001] Cannot cast to xs:float: undefined. in /var/www/html/lib/BaseXClient.php:185
Stack trace:
#0 /var/www/html/lib/BaseXClient.php(136): Query-&gt;exec('\x03', '0\x00lonBR\x00undefin...')
#1 /var/www/html/geojson.php(18): Query-&gt;bind('lonBR', 'undefined', 'xs:float')
#2 {main}
  thrown in <b>/var/www/html/lib/BaseXClient.php</b> on line <b>185</b><br />
@kumy
Copy link
Member Author

kumy commented Aug 8, 2017

It's normal to not cast undefined to float, however, displaying php error is a bad practice in production.

I've disabled error reporting, now such request return a 500 server internal error. I would be better in this case to return a 400, to indicate clients, that they have send a bad request.

@kumy kumy self-assigned this Aug 8, 2017
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

1 participant