I installed PHP 8.1 but I have an error appear about deprecated function. Do you have an idea about that and to resolve it?
Deprecated: Return type of OM\Db::prepare(string $statement, $driver_options = null) should either be compatible with PDO::prepare(string $query, array $options = []): PDOStatement|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in //OM/Db.php on line 114
Line 114
protected ?array $driver_options = null;
protected ?array $options = null;
public function prepare(string $statement, ?array $driver_options = null) //php8
{
$statement = $this->autoPrefixTables($statement);
$DbStatement = parent::prepare($statement, \is_array($driver_options) ? $driver_options : []);
$DbStatement->setQueryCall('prepare');
$DbStatement->setPDO($this);
return $DbStatement;
}