Skip to content

Commit 0ad0f6c

Browse files
authored
Merge pull request cakephp#18914 from cakephp/cleanup
Code cleanup
2 parents 3fbcd15 + ab33e93 commit 0ad0f6c

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/Cache/Cache.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,13 +209,13 @@ public static function pool(string $config): CacheInterface&CacheEngineInterface
209209

210210
$registry = static::getRegistry();
211211

212-
if (isset($registry->{$config})) {
213-
return $registry->{$config};
212+
if ($registry->has($config)) {
213+
return $registry->get($config);
214214
}
215215

216216
static::_buildEngine($config);
217217

218-
return $registry->{$config};
218+
return $registry->get($config);
219219
}
220220

221221
/**

src/Http/Client/Adapter/Curl.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ public function send(RequestInterface $request, array $options): array
4646
}
4747

4848
$ch = curl_init();
49+
if ($ch === false) {
50+
throw new ClientException('Could not initialize curl session.');
51+
}
52+
4953
$options = $this->buildOptions($request, $options);
5054
curl_setopt_array($ch, $options);
5155

0 commit comments

Comments
 (0)