[php-src] Issue #22051: Inconsistent/missing checks for sqlite3 APIs

[email protected] (ndossche)
Newsgroups php.bugs
Message-ID <Nlg3Sq9QSFM7bvFm7E1NmEYsczmFOTp81xFCcwTugLQ@main.internal.php.net>
Issue: https://github.com/php/php-src/issues/22051
Author: ndossche

### Description

Several calls to `sqlite3_reset` and `sqlite3_finalize` are unchecked.

Some calls to `sqlite3_reset` are checked and then the value is returned to the user:

https://github.com/php/php-src/blob/cde32beadeee04c16d8607266ea7586078fbc9df/ext/sqlite3/sqlite3.c#L1414-L1417

https://github.com/php/php-src/blob/cde32beadeee04c16d8607266ea7586078fbc9df/ext/sqlite3/sqlite3.c#L2101-L2103

Note however an inconsistency between these two: one of them throw/warns and the other one doesn't. This likely needs to be made consistent.

It's probably best if the calls to `sqlite3_reset` and `sqlite3_finalize` are checked consistently everywhere.

Note: found by a static-dynamic hybrid analyzer I'm developing.

### PHP Version

```plain
Checked on master branch
```

### Operating System

N/A
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.