Skip to content

Commit da27b50

Browse files
vinayshahclaude
andcommitted
fix: guard curl_share_close() against PHP 8.5 deprecation
curl_share_close() is a no-op since PHP 8.0 and deprecated in PHP 8.5. Skip the call on PHP 8+ to avoid deprecation notices. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 55c8b05 commit da27b50

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

QuickChart.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ function __construct($options = array()) {
5151

5252
function __destruct() {
5353
if ($this->_curlShare !== null) {
54-
curl_share_close($this->_curlShare);
54+
// curl_share_close() is a no-op since PHP 8.0 and deprecated in PHP 8.5
55+
if (PHP_MAJOR_VERSION < 8) {
56+
curl_share_close($this->_curlShare);
57+
}
5558
$this->_curlShare = null;
5659
}
5760
}

0 commit comments

Comments
 (0)