Use empty string instead of NULL for mysqli SSL parameters by default

parent c70832a8
......@@ -89,11 +89,11 @@ final class Driver extends AbstractMySQLDriver
isset($params['ssl_cipher'])
) {
$initializers[] = new Secure(
$params['ssl_key'] ?? null,
$params['ssl_cert'] ?? null,
$params['ssl_ca'] ?? null,
$params['ssl_capath'] ?? null,
$params['ssl_cipher'] ?? null
$params['ssl_key'] ?? '',
$params['ssl_cert'] ?? '',
$params['ssl_ca'] ?? '',
$params['ssl_capath'] ?? '',
$params['ssl_cipher'] ?? ''
);
}
......
......@@ -9,22 +9,22 @@ use mysqli;
final class Secure implements Initializer
{
/** @var string|null */
/** @var string */
private $key;
/** @var string|null */
/** @var string */
private $cert;
/** @var string|null */
/** @var string */
private $ca;
/** @var string|null */
/** @var string */
private $capath;
/** @var string|null */
/** @var string */
private $cipher;
public function __construct(?string $key, ?string $cert, ?string $ca, ?string $capath, ?string $cipher)
public function __construct(string $key, string $cert, string $ca, string $capath, string $cipher)
{
$this->key = $key;
$this->cert = $cert;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment