Skip to content

Commit 2b23430

Browse files
committed
Properly set default value for mysqli
The port always should be integer. See PR #1530 Signed-off-by: Michal Čihař <michal@cihar.com>
1 parent 871b95e commit 2b23430

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

libraries/dbi/DBIMysqli.class.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ public function connect(
142142
global $cfg;
143143

144144
$server_port = $GLOBALS['dbi']->getServerPort($server);
145+
if ($server_port === null) {
146+
$server_port = 0;
147+
}
145148
$server_socket = $GLOBALS['dbi']->getServerSocket($server);
146149

147150
if ($server) {

0 commit comments

Comments
 (0)