mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-27 09:49:22 +02:00
Fix compatibility with PHP 7.0 and lower
This commit is contained in:
parent
62faacbed6
commit
aa17ddbf24
@ -1,16 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
if (PHP_VERSION_ID >= 80000) {
|
if (PHP_VERSION_ID >= 80000) {
|
||||||
trait OTS_DB_PDOQuery
|
require LIBS . 'pot/OTS_DB_PDOQuery_PHP71.php';
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @return PDOStatement
|
|
||||||
*/
|
|
||||||
public function query(?string $query = null, ?int $fetchMode = null, mixed ...$fetchModeArgs)
|
|
||||||
{
|
|
||||||
return $this->doQuery($query, $fetchMode, ...$fetchModeArgs);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
trait OTS_DB_PDOQuery
|
trait OTS_DB_PDOQuery
|
||||||
{
|
{
|
||||||
|
12
system/libs/pot/OTS_DB_PDOQuery_PHP71.php
Normal file
12
system/libs/pot/OTS_DB_PDOQuery_PHP71.php
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
trait OTS_DB_PDOQuery
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @return PDOStatement
|
||||||
|
*/
|
||||||
|
public function query(?string $query = null, ?int $fetchMode = null, mixed ...$fetchModeArgs)
|
||||||
|
{
|
||||||
|
return $this->doQuery($query, $fetchMode, ...$fetchModeArgs);
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user