Fix #2065 add ReturnTypeWillChange attribute to DBHelper

This commit is contained in:
Kijin Sung 2023-01-16 21:16:13 +09:00
parent b8351bf3c8
commit 8e2c4b3ef9
2 changed files with 15 additions and 15 deletions

View file

@ -31,21 +31,17 @@ class DBStmtHelper extends \PDOStatement
/**
* Execute a prepared statement.
*
* We don't set a type for $input_parameters because the original
* PDOStatement class accepts both arrays and null. Actually, the null
* value must be omitted altogether or it will throw an error.
*
* @param array $input_parameters
* @param array $params
* @return bool
*/
public function execute($input_parameters = null): bool
public function execute(?array $params = null): bool
{
$start_time = microtime(true);
$db_class = DB::getInstance($this->_type);
try
{
$result = parent::execute($input_parameters);
$result = parent::execute($params);
$db_class->clearError();
}
catch (\PDOException $e)