File tree 2 files changed +8
-6
lines changed
lib/aws-sdk/Guzzle/Http/Curl
2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -233,6 +233,8 @@ public static function factory(RequestInterface $request)
233
233
*/
234
234
public function __construct ($ handle , $ options )
235
235
{
236
+ $ this ->handle = false ;
237
+
236
238
if ($ handle === false ) {
237
239
throw new InvalidArgumentException ('Invalid handle provided ' );
238
240
}
@@ -259,11 +261,11 @@ public function __destruct()
259
261
*/
260
262
public function close ()
261
263
{
262
- if ($ this ->handle !== false ) {
264
+ if (!!( $ this ->handle ) ) {
263
265
curl_close ($ this ->handle );
264
266
unset($ this ->handle );
265
267
}
266
- $ this ->handle = null ;
268
+ $ this ->handle = false ;
267
269
}
268
270
269
271
/**
@@ -273,7 +275,7 @@ public function close()
273
275
*/
274
276
public function isAvailable ()
275
277
{
276
- return $ this ->handle !== false ;
278
+ return !!( $ this ->handle ) ;
277
279
}
278
280
279
281
/**
@@ -323,7 +325,7 @@ public function setErrorNo($error)
323
325
*/
324
326
public function getInfo ($ option = null )
325
327
{
326
- if ($ this ->handle === false ) {
328
+ if (!( $ this ->handle ) ) {
327
329
return null ;
328
330
}
329
331
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ public function __construct($selectTimeout = 1.0)
49
49
$ this ->selectTimeout = $ selectTimeout ;
50
50
$ this ->multiHandle = curl_multi_init ();
51
51
// @codeCoverageIgnoreStart
52
- if ($ this ->multiHandle === false ) {
52
+ if (!( $ this ->multiHandle ) ) {
53
53
throw new CurlException ('Unable to create multi handle ' );
54
54
}
55
55
// @codeCoverageIgnoreEnd
@@ -58,7 +58,7 @@ public function __construct($selectTimeout = 1.0)
58
58
59
59
public function __destruct ()
60
60
{
61
- if ($ this ->multiHandle !== false ) {
61
+ if (!!( $ this ->multiHandle ) ) {
62
62
curl_close ($ this ->multiHandlee );
63
63
unset($ this ->multiHandle );
64
64
}
You can’t perform that action at this time.
0 commit comments