Fix compatibility with PHP 8.0 (latest XAMPP)

Solution by doctrine developers
This commit is contained in:
slawkens
2021-02-16 00:28:54 +01:00
parent 746a5dc816
commit dbc76abcdd
4 changed files with 30 additions and 4 deletions

View File

@@ -23,6 +23,7 @@
*/
abstract class OTS_Base_DB extends PDO implements IOTS_DB
{
use OTS_DB_PDOQuery;
/**
* Tables prefix.
*
@@ -74,7 +75,7 @@ abstract class OTS_Base_DB extends PDO implements IOTS_DB
return $this->fieldName($this->prefix . $name);
}
public function query($query)
private function doQuery(...$args)
{
$this->queries++;
@@ -82,7 +83,7 @@ abstract class OTS_Base_DB extends PDO implements IOTS_DB
$startTime = microtime(true);
}
$ret = parent::query($query);
$ret = parent::query(...$args);;
if($this->logged) {
$totalTime = microtime(true) - $startTime;
$this->log .= round($totalTime, 4) . ' ms - ' . $query . PHP_EOL;