Fix PHP error for invalid cert files

This commit is contained in:
phl0
2025-11-19 14:17:53 +01:00
parent 6b35bd48bd
commit 6589fd69c1

View File

@@ -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);