Don't save and process empty files

This commit is contained in:
int2001
2024-12-05 07:10:48 +00:00
parent 4b85ebb988
commit 0f1396f2a5

View File

@@ -370,8 +370,8 @@ class Qrz extends CI_Controller {
curl_setopt( $ch, CURLOPT_USERAGENT, 'Wavelog/'.$this->optionslib->get_option('version'));
$content = htmlspecialchars_decode(curl_exec($ch));
file_put_contents($file, $content);
if (strlen(file_get_contents($file, false, null, 0, 100))!=100) {
if (strlen($content)<100) {
file_put_contents($file, $content);
$result = "QRZ downloading failed, either due to it being down or incorrect logins.";
return "false";
}