Skip to content

Commit 5043a1c

Browse files
committed
Destory curl if it exists
1 parent 240efd8 commit 5043a1c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

iPublications/Profit/CurlClient.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ protected function set($opt, $val)
128128

129129
public function __destruct()
130130
{
131-
@curl_close($this->curl);
131+
if($this->curl !== null){
132+
@curl_close($this->curl);
133+
}
132134
}
133135
}

0 commit comments

Comments
 (0)