diff --git a/ssl_certificates.php b/ssl_certificates.php index 008c7474..7a699a78 100644 --- a/ssl_certificates.php +++ b/ssl_certificates.php @@ -106,9 +106,13 @@ if (count($all_certs) == 0) { if (empty($cert['domain']) || empty($cert['ssl_cert_file'])) { // no domain found to the entry or empty entry - safely delete it from the DB - Database::pexecute($del_stmt, array( - 'id' => $cert['id'] - )); + try { + Certificates::getLocal($userinfo, array( + 'id' => $cert['id'] + ))->delete(); + } catch (Exception $e) { + // do nothing + } continue; }