我刚刚安装了 PHP 8 并且出现了这个错误?我如何解决它?
致命错误:OM\Db::query(string $statement) 的声明必须与 /home/www/includes 中的 PDO::query(string $query, ?int $fetchMode = null, mixed ...$fetchModeArgs) 兼容/OM/Db.php 在第 131 行
我的 OM/Db.php
public function query(string $statement) =====> line 131
{
$statement = $this->autoPrefixTables($statement);
$args = func_get_args();
if (count($args) > 1) {
$DbStatement = call_user_func_array(array($this, 'parent::query'), $args);
} else {
$DbStatement = parent::query($statement);
}
if ($DbStatement !== false) {
$DbStatement->setQueryCall('query');
$DbStatement->setPDO($this);
}
return $DbStatement;
}