pear / DB

http://pear.php.net/package/DB
9 stars 34 forks source link

sqlite3 back-end incorrectly refers to 'resource' objects #38

Closed MarkMaldaba closed 5 months ago

MarkMaldaba commented 6 months ago

The sqlite3 back-end looks like it was created by copying and adapting the sqlite back-end. It therefore contains a lot of references to resource in function return types and comments.

However, the SQLite3 class class returns an SQLite3Result object for all query actions, not a resource instance. This has always been the case so is not a compatibility issue, just something that was missed when the DB_sqlite3 class was created.

As far as I can see, the only functional issue outside of the code comments and annotations is that there is an is_resource() check in the freeResult() function, which means that this function always returns false. In practice, there is nothing to free, so behaviour of the function is unaffected. However, any code which is checking the result of freeResult() may end up misreporting that an error occurred.

schengawegga commented 6 months ago

Thank you @MarkMaldaba . I will have a look at it soon.