Skip to content

Commit 8b7f3a8

Browse files
committed
fix: prevent using empty()
1 parent 3b9deae commit 8b7f3a8

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
@@ -5410,7 +5410,7 @@
54105410
$ignoreErrors[] = [
54115411
// identifier: empty.notAllowed
54125412
'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#',
5413-
'count' => 11,
5413+
'count' => 10,
54145414
'path' => __DIR__ . '/system/HTTP/CURLRequest.php',
54155415
];
54165416
$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)