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

Client crashes when attempting to write invalid values into database #2

Open
Krelyshy opened this issue Oct 14, 2020 · 0 comments
Open

Comments

@Krelyshy
Copy link

Hello! Your client works nice and smooth but when I set the range filter to middle europe (only because there were clients at the time) it started to throw a pretty weird error which seems to be caused by an attempt to insert a string into an integer column in the database (I am not experienced enough with PHP but that seems to be the error). It might be caused by some other client sending invalid data. Here are the last few lines from console before the crash occured:

OgnPosition: in savePositions() - trying to save buffer to db
PHP Fatal error:  Uncaught PDOException: SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: '' for column `ogn`.`ogn_logs`.`climbrate` at row 1 in /var/www/html/ogn/vendor/dbursem/ogn-client-php/lib/OGNClient.php:212
Stack trace:
#0 /var/www/html/ogn/vendor/dbursem/ogn-client-php/lib/OGNClient.php(212): PDOStatement->execute(Array)
#1 /var/www/html/ogn/aprsbot.php(59): dbursem\OGNClient\OGNClient->savePositions()
#2 {main}
  thrown in /var/www/html/ogn/vendor/dbursem/ogn-client-php/lib/OGNClient.php on line 212

Sometimes, the client crashes immediately after launch due to the same error.

Thank you for the amazing client!
Sincerely, Chris Deer

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