File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -288,7 +288,13 @@ public function exec()
288
288
289
289
// send the return values to the callback function.
290
290
291
- $ key = (string ) $ done ['handle ' ];
291
+
292
+ if (is_object ($ done ['handle ' ])) {
293
+ $ key = spl_object_id ( $ done ['handle ' ] );
294
+ } else {
295
+ $ key = (string ) $ done ['handle ' ] ;
296
+ }
297
+
292
298
$ task_id = $ this ->handleMapTasks [$ key ];
293
299
$ request = $ this ->pendingRequests [$ this ->handleMapTasks [$ key ]];
294
300
@@ -367,7 +373,12 @@ private function _prepareLoopQue($task_id)
367
373
// pool
368
374
curl_multi_add_handle ($ this ->handlerMulti (), $ h );
369
375
370
- $ key = (string ) $ h ;
376
+ if (is_object ($ h )) {
377
+ $ key = spl_object_id ( $ h );
378
+ } else {
379
+ $ key = (string ) $ h ;
380
+ }
381
+
371
382
$ this ->handleMapTasks [$ key ] = $ task_id ;
372
383
}
373
384
}
You can’t perform that action at this time.
0 commit comments