mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
Fix type error in DBHelper::query() when there is a query error
This commit is contained in:
parent
c07efe7905
commit
0ba4c51c3c
1 changed files with 3 additions and 2 deletions
|
|
@ -86,10 +86,10 @@ class DBHelper extends \PDO
|
||||||
*
|
*
|
||||||
* @param string $statement
|
* @param string $statement
|
||||||
* @param int $fetch_mode
|
* @param int $fetch_mode
|
||||||
* @return DBStmtHelper
|
* @return DBStmtHelper|false
|
||||||
*/
|
*/
|
||||||
#[\ReturnTypeWillChange]
|
#[\ReturnTypeWillChange]
|
||||||
public function query(string $statement, ?int $fetch_mode = \PDO::FETCH_OBJ, ...$fetch_mode_args): DBStmtHelper
|
public function query(string $statement, ?int $fetch_mode = \PDO::FETCH_OBJ, ...$fetch_mode_args)
|
||||||
{
|
{
|
||||||
$start_time = microtime(true);
|
$start_time = microtime(true);
|
||||||
$db_class = DB::getInstance($this->_type);
|
$db_class = DB::getInstance($this->_type);
|
||||||
|
|
@ -110,6 +110,7 @@ class DBHelper extends \PDO
|
||||||
}
|
}
|
||||||
catch (\PDOException $e)
|
catch (\PDOException $e)
|
||||||
{
|
{
|
||||||
|
$stmt = false;
|
||||||
$db_class->setError(-1, $e->getMessage());
|
$db_class->setError(-1, $e->getMessage());
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue