mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 09:44:55 +02:00
Fix compatibility with PHP 8.0 (latest XAMPP)
Solution by doctrine developers
This commit is contained in:
25
system/libs/pot/OTS_DB_PDOQuery.php
Normal file
25
system/libs/pot/OTS_DB_PDOQuery.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?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());
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user