Skip to content

Commit 9a9da14

Browse files
committed
refactor: replace empty()
1 parent 54b0441 commit 9a9da14

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

phpstan-baseline.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3106,7 +3106,7 @@
31063106
$ignoreErrors[] = [
31073107
// identifier: empty.notAllowed
31083108
'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#',
3109-
'count' => 5,
3109+
'count' => 3,
31103110
'path' => __DIR__ . '/system/Database/OCI8/Connection.php',
31113111
];
31123112
$ignoreErrors[] = [

system/Database/OCI8/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public function connect(bool $persistent = false)
126126

127127
$func = $persistent ? 'oci_pconnect' : 'oci_connect';
128128

129-
return empty($this->charset)
129+
return ($this->charset === '')
130130
? $func($this->username, $this->password, $this->DSN)
131131
: $func($this->username, $this->password, $this->DSN, $this->charset);
132132
}

0 commit comments

Comments
 (0)