From 134e639995c9a7a930da31c5b615d51997d0d177 Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Mon, 27 May 2024 15:10:38 +0200 Subject: Fix it_url::get with maxlength and large response --- it_url.class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'it_url.class') diff --git a/it_url.class b/it_url.class index 953562d..01913e3 100644 --- a/it_url.class +++ b/it_url.class @@ -316,7 +316,7 @@ function request($p=array()) { $opts[CURLOPT_WRITEFUNCTION] = function ($dummy, $data) use ($p, &$content) { static $space; - $write = min($space ?? $p['maxlength'], strlen($data)); + $write = min($space ??= $p['maxlength'], strlen($data)); $content .= substr($data, 0, $write); $space -= $write; return $write; -- cgit v1.2.3