Skip to content

Commit e4369b7

Browse files
committed
fix: prevent using empty()
1 parent c1058eb commit e4369b7

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
@@ -5470,7 +5470,7 @@
54705470
$ignoreErrors[] = [
54715471
// identifier: empty.notAllowed
54725472
'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#',
5473-
'count' => 11,
5473+
'count' => 10,
54745474
'path' => __DIR__ . '/system/HTTP/CURLRequest.php',
54755475
];
54765476
$ignoreErrors[] = [

system/HTTP/CURLRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ protected function setCURLOptions(array $curlOptions = [], array $config = [])
650650
}
651651

652652
// Resolve IP
653-
if (! empty($config['force_ip_resolve'])) {
653+
if (array_key_exists('force_ip_resolve', $config) && $config['force_ip_resolve']) {
654654
$protocolVersion = $config['force_ip_resolve'];
655655

656656
if ($protocolVersion === 'v4') {

0 commit comments

Comments
 (0)