Skip to content

Commit

Permalink
Merge pull request #29 from DocnetUK/bugfix/flags-php-deprecation
Browse files Browse the repository at this point in the history
PHP Deprecated: mysqli::real_connect(): Passing null to parameter #7
  • Loading branch information
kabudu authored Dec 21, 2022
2 parents dd54e92 + 1540a23 commit ddc1dab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/Docnet/DB/ConnectionSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ class ConnectionSettings implements ConnectionSettingsInterface
/**
* DB connection flags
*
* @var int|null
* @var int
*/
private $int_flags = null;
private $int_flags = 0;

/**
* Optionally Configure on construction
Expand All @@ -93,7 +93,7 @@ public function __construct(
$str_db = null,
$str_port = null,
$str_socket = null,
$int_flags = null
$int_flags = 0
) {
$this->str_host = $str_host;
$this->str_user = $str_user;
Expand Down Expand Up @@ -167,7 +167,7 @@ public function getSocket()
/**
* Get the connection flags
*
* @return int|null
* @return int
*/
public function getFlags()
{
Expand Down Expand Up @@ -249,7 +249,7 @@ public function setSocket($str_socket)
/**
* Set the DB connection flags
*
* @param int|null $int_flags
* @param int $int_flags
* @return self
*/
public function setFlags($int_flags)
Expand Down
2 changes: 1 addition & 1 deletion src/Docnet/DB/ConnectionSettingsInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function getSocket();
/**
* Get connection flags to use
*
* @return int|null
* @return int
*/
public function getFlags();

Expand Down

0 comments on commit ddc1dab

Please sign in to comment.