poggit / libasynql

Asynchronous MySQL access library for PocketMine plugins.
https://poggit.github.io/libasynql
Apache License 2.0
132 stars 44 forks source link

Fix SQLite3 returning incorrect value for SQLite3Result::columnType() #30

Closed Muqsit closed 4 years ago

Muqsit commented 4 years ago

When columns are checked for their types prior to SQLite3Result::fetchArray(), the value of columnType() is always SQLITE3_NULL (5) in PHP < 7.3.16, and false since PHP 7.3.16 (causing an undefined offset 0 error because of php's type-juggling). SQLite3 resolves types dynamically[1] which is possible only after a SQLite3Result::fetchArray() call.