From 5eb8df7432a708284862e4b126e418265d36b4ab Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 2 May 2022 18:49:09 +0200 Subject: [inc/Util] Add types, move error printing functions to their own class --- inc/download.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'inc/download.inc.php') diff --git a/inc/download.inc.php b/inc/download.inc.php index 39f8e2e2..5a71014e 100644 --- a/inc/download.inc.php +++ b/inc/download.inc.php @@ -14,7 +14,7 @@ class Download if (self::$curlHandle === false) { self::$curlHandle = curl_init(); if (self::$curlHandle === false) { - Util::traceError('Could not initialize cURL'); + ErrorHandler::traceError('Could not initialize cURL'); } curl_setopt(self::$curlHandle, CURLOPT_CONNECTTIMEOUT, ceil($timeout / 2)); curl_setopt(self::$curlHandle, CURLOPT_TIMEOUT, $timeout); @@ -30,7 +30,7 @@ class Download $head = fopen($tmpfile, 'w+b'); unlink($tmpfile); if ($head === false) - Util::traceError("Could not open temporary head file $tmpfile for writing."); + ErrorHandler::traceError("Could not open temporary head file $tmpfile for writing."); curl_setopt(self::$curlHandle, CURLOPT_WRITEHEADER, $head); return self::$curlHandle; } @@ -111,7 +111,7 @@ class Download { $fh = fopen($target, 'wb'); if ($fh === false) - Util::traceError("Could not open $target for writing."); + ErrorHandler::traceError("Could not open $target for writing."); $ch = self::initCurl($url, $timeout, $head); curl_setopt($ch, CURLOPT_FILE, $fh); $res = curl_exec($ch); -- cgit v1.2.3-55-g7522