Skip to content
This repository was archived by the owner on Jan 13, 2022. It is now read-only.

Commit eb74731

Browse files
committed
Calling init creates a curl handler without checking if a handle has already been created.
1 parent ebc8266 commit eb74731

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Facebook/HttpClients/FacebookCurl.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,16 @@ class FacebookCurl
3535
/**
3636
* @var resource Curl resource instance
3737
*/
38-
protected $curl;
38+
protected $curl = null;
3939

4040
/**
4141
* Make a new curl reference instance
4242
*/
4343
public function init()
4444
{
45-
$this->curl = curl_init();
45+
if ($this->curl === null) {
46+
$this->curl = curl_init();
47+
}
4648
}
4749

4850
/**

0 commit comments

Comments
 (0)