diff options
Diffstat (limited to 'it_url.class')
-rw-r--r-- | it_url.class | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/it_url.class b/it_url.class index 6b1f81c..c1d7ec5 100644 --- a/it_url.class +++ b/it_url.class @@ -361,13 +361,13 @@ static function get_multi($p=null) curl_setopt($handle, CURLOPT_URL, it::replace([ '^//' => "http://" ], is_array($url) ? $url['url'] : $url)); curl_setopt_array($handle, $opts); curl_multi_add_handle($mh, $handle); - $keys[$handle] = $key; + $keys[(int)$handle] = $key; $handles[$key] = $handle; }; $closehandle = function ($key) use (&$keys, &$handles, $mh) { curl_multi_remove_handle($mh, $handles[$key]); curl_close($handles[$key]); - unset($keys[$handles[$key]]); + unset($keys[(int)$handles[$key]]); unset($handles[$key]); }; @@ -406,7 +406,7 @@ static function get_multi($p=null) { if ($info['msg'] == CURLMSG_DONE) { - $key = $keys[$info['handle']]; + $key = $keys[(int)$info['handle']]; $content = curl_multi_getcontent($info['handle']); if (isset($p['postprocess'])) $content = $p['postprocess']($content, ['it_error' => $retries[$key] < $p['retries'] ? false : (array)$p['it_error'] + ['title' => "invalid content from " . $urls[$key]]]); |