diff options
Diffstat (limited to 'lib/Minz/Pdo.php')
| -rw-r--r-- | lib/Minz/Pdo.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Minz/Pdo.php b/lib/Minz/Pdo.php index d334c0533..9c754be86 100644 --- a/lib/Minz/Pdo.php +++ b/lib/Minz/Pdo.php @@ -28,6 +28,8 @@ abstract class Minz_Pdo extends PDO { return $this->autoPrefix($statement); } + // PHP8+: PDO::lastInsertId(?string $name = null): string|false + #[\ReturnTypeWillChange] public function lastInsertId($name = null) { if ($name != null) { $name = $this->preSql($name); @@ -35,16 +37,22 @@ abstract class Minz_Pdo extends PDO { return parent::lastInsertId($name); } + // PHP8+: PDO::prepare(string $query, array $options = []): PDOStatement|false + #[\ReturnTypeWillChange] public function prepare($statement, $driver_options = array()) { $statement = $this->preSql($statement); return parent::prepare($statement, $driver_options); } + // PHP8+: PDO::exec(string $statement): int|false + #[\ReturnTypeWillChange] public function exec($statement) { $statement = $this->preSql($statement); return parent::exec($statement); } + // PHP8+: PDO::query(string $query, ?int $fetchMode = null, mixed ...$fetchModeArgs): PDOStatement|false + #[\ReturnTypeWillChange] public function query($query, $fetch_mode = null, ...$fetch_mode_args) { $query = $this->preSql($query); return $fetch_mode ? parent::query($query, $fetch_mode, ...$fetch_mode_args) : parent::query($query); |
