From 1e4ff3ce110f72187fc8e5fc8093a984d587a8d4 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 26 Jan 2020 11:34:45 +0100 Subject: [PATCH] fixed issue with non-existing entries --- lam/lib/pdf.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lam/lib/pdf.inc b/lam/lib/pdf.inc index da04b235..23bdb271 100644 --- a/lam/lib/pdf.inc +++ b/lam/lib/pdf.inc @@ -5,7 +5,7 @@ use LAM\ImageUtils\ImageManipulationFactory; /* This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) Copyright (C) 2003 - 2004 Michael Duergner - 2003 - 2019 Roland Gruber + 2003 - 2020 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -121,7 +121,10 @@ function createPdf($structure, $accounts, $pdfKeys, $account_type, $font, $retur } elseif ($section instanceof PDFEntrySection) { // section headline - if($section->isAttributeTitle()) { + if ($section->isAttributeTitle()) { + if (empty($entries[$section->getPdfKey()][0])) { + continue; + } $section_headline = getSectionHeadline($entries[$section->getPdfKey()][0]); } else {