mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-21 02:20:54 +08:00
fix php8 compatibility
This commit is contained in:
@@ -9,7 +9,7 @@ class DBMysqli implements DBInterface
|
||||
$mysqli = new mysqli($host, $username, $password, $database, $port);
|
||||
/* check connection */
|
||||
if (mysqli_connect_errno()) {
|
||||
throw new \RuntimeException(mysqli_connect_error());
|
||||
throw new \DatabaseException('', mysqli_connect_error());
|
||||
}
|
||||
/* activate reporting */
|
||||
$driver = new mysqli_driver();
|
||||
@@ -71,5 +71,10 @@ class DBMysqli implements DBInterface
|
||||
return $this->mysqli->real_escape_string($string);
|
||||
}
|
||||
|
||||
public function lastInsertId(): int
|
||||
{
|
||||
return $this->mysqli->insert_id;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user