You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Instrumentation/Curl/src/CurlInstrumentation.php
+10-8Lines changed: 10 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -84,11 +84,9 @@ public static function register(): void
84
84
pre: null,
85
85
post: staticfunction ($_obj, array$params, mixed$retVal) use ($curlHandleToAttributes) {
86
86
if ($retVal != true) {
87
-
if (curl_error($params[0])) {
88
-
foreach ($params[1] as$option => $value) {
89
-
if (!curl_setopt($params[0], $option, $value)) {
90
-
break;
91
-
}
87
+
foreach ($params[1] as$option => $value) {
88
+
if (!curl_setopt($params[0], $option, $value)) {
89
+
break;
92
90
}
93
91
}
94
92
@@ -341,7 +339,7 @@ public static function register(): void
341
339
foreach ($handlesas$cHandle => &$metadata) {
342
340
if ($metadata['finished'] == false) {
343
341
$metadata['finished'] = true;
344
-
self::finishMultiSpan(CURLE_OK, $cHandle, $curlHandleToAttributes, $metadata['span']->get()); // there is no way to get information if it was OK or not without calling curl_multi_info_read
342
+
self::finishMultiSpan(CURLE_OK, $cHandle, $curlHandleToAttributes, $metadata['span']?->get()); // there is no way to get information if it was OK or not without calling curl_multi_info_read
345
343
}
346
344
}
347
345
@@ -381,15 +379,19 @@ public static function register(): void
0 commit comments