summaryrefslogtreecommitdiff
path: root/it_url.class
diff options
context:
space:
mode:
authorChristian Schneider2020-09-15 13:20:03 +0200
committerChristian Schneider2020-09-15 13:20:03 +0200
commit79fd50e172a50918d9018f54ab6e40606181f95b (patch)
treec3292f632de47c825d16c55ca51a00ce68b4b3a4 /it_url.class
parentf42d056812d4c1766d75bd8ab6d871e06a700302 (diff)
downloaditools-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.class6
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]]]);