Update commands to php 8.1

This commit is contained in:
Tim
2022-09-28 13:34:03 +02:00
parent 55395666b7
commit 3920ed4244
7 changed files with 9 additions and 8 deletions

View File

@ -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);
}
}