Skip to content

Commit

Permalink
fix issue codeigniter4#8809: Bug: Argument codeigniter4#1 () must be …
Browse files Browse the repository at this point in the history
…of type ?int, string given
  • Loading branch information
allyblaise committed Apr 19, 2024
1 parent 6934848 commit ba568e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/Database/OCI8/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ protected function buildDSN()
}

$isEasyConnectableHostName = $this->hostname !== '' && ! str_contains($this->hostname, '/') && ! str_contains($this->hostname, ':');
$easyConnectablePort = ! empty($this->port) && ctype_digit($this->port) ? ':' . $this->port : '';
$easyConnectablePort = ! empty($this->port) && ctype_digit((string)$this->port) ? ':' . $this->port : '';
$easyConnectableDatabase = $this->database !== '' ? '/' . ltrim($this->database, '/') : '';

if ($isEasyConnectableHostName && ($easyConnectablePort !== '' || $easyConnectableDatabase !== '')) {
Expand Down

0 comments on commit ba568e1

Please sign in to comment.