From 6589fd69c1622918ec9f977a267155e0290366d6 Mon Sep 17 00:00:00 2001 From: phl0 Date: Wed, 19 Nov 2025 14:17:53 +0100 Subject: [PATCH] Fix PHP error for invalid cert files --- application/controllers/Lotw.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/controllers/Lotw.php b/application/controllers/Lotw.php index c476724a5..8f44a1241 100644 --- a/application/controllers/Lotw.php +++ b/application/controllers/Lotw.php @@ -422,7 +422,7 @@ class Lotw extends CI_Controller { $filename = file_get_contents('file://'.$file); $worked = openssl_pkcs12_read($filename, $results, $password); - if ($results['cert']) { + if (array_key_exists('cert', $results)) { $data['general_cert'] = $results['cert']; } else { log_message('error', 'Found no certificate in file '.$file);