Open s22-tech opened 1 year ago
I found it, and it's actually a pretty simple fix. Line 236 needs to be changed to:
public function query($statement, ...$params) {
That's it! It now works under PHP 8.0.
Also, keep in mind that you have to call PDOExtended, instead of just PDO, when creating your $pdo instance,
e.g. $pdo = new \PDOExtended($dsn, $db_username, $db_password, $options);
.
That threw me for awhile until I finally saw my mistake. 😕
Trying to use this class, I get this error:
PHP Fatal error: Declaration of PDOExtended::query($statement, $params = []) must be compatible with PDO::query(string $query, ?int $fetchMode = null, mixed ...$fetchModeArgs) in class.pdo.extended.php line 236
Any idea how to fix this?