我刚刚安装了 PHP 8,却出现此错误?我如何解决它?
致命错误: OM\Db::query(string $statement) 的声明必须与 /home/www/includes 中的 PDO::query(string $query, ?int $fetchMode = null, mix ...$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;
}
-
Remove "doctrine/dbal": "^2.10"
from composer.json
-
然后(最后)运行composer update
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)