myaac/system/libs/pot/OTS_DB_PDOQuery.php
slawkens 5bd5aa0edf Fix compatibility with PHP 8.0 (latest XAMPP)
Solution by doctrine developers
2021-02-16 00:28:54 +01:00

26 lines
432 B
PHP

<?php
if (PHP_VERSION_ID >= 80000) {
trait OTS_DB_PDOQuery
{
/**
* @return PDOStatement
*/
public function query(?string $query = null, ?int $fetchMode = null, mixed ...$fetchModeArgs)
{
return $this->doQuery($query, $fetchMode, ...$fetchModeArgs);
}
}
} else {
trait OTS_DB_PDOQuery
{
/**
* @return PDOStatement
*/
public function query()
{
return $this->doQuery(...func_get_args());
}
}
}