diff options
author | Christian Schneider | 2020-09-15 13:20:03 +0200 |
---|---|---|
committer | Christian Schneider | 2020-09-15 13:20:03 +0200 |
commit | 79fd50e172a50918d9018f54ab6e40606181f95b (patch) | |
tree | c3292f632de47c825d16c55ca51a00ce68b4b3a4 /it_url.class | |
parent | f42d056812d4c1766d75bd8ab6d871e06a700302 (diff) | |
download | itools-79fd50e172a50918d9018f54ab6e40606181f95b.tar.gz itools-79fd50e172a50918d9018f54ab6e40606181f95b.tar.bz2 itools-79fd50e172a50918d9018f54ab6e40606181f95b.zip |
Make itools PHP 8 compatible
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]]]); |