Update commands to php 8.1
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Service;
|
||||
|
||||
use Exception;
|
||||
use mysqli;
|
||||
|
||||
class MysqliConnection
|
||||
@ -12,7 +13,7 @@ class MysqliConnection
|
||||
{
|
||||
$this->connection = new mysqli($credentials->getHostname(), $credentials->getUser(), $credentials->getPassword());
|
||||
if ($this->connection->connect_error) {
|
||||
throw new \Exception("Connection failed: " . $this->connection->connect_error);
|
||||
throw new Exception("Connection failed: " . $this->connection->connect_error);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user