diff --git a/lam/lib/pdfstruct.inc b/lam/lib/pdfstruct.inc index 5cedd21b..6d5e6568 100644 --- a/lam/lib/pdfstruct.inc +++ b/lam/lib/pdfstruct.inc @@ -652,7 +652,7 @@ class PDFEntrySection { * @return boolean is attribute */ public function isAttributeTitle() { - return boolval(preg_match('/^_([a-zA-Z0-9_-])+$/', $this->title)); + return (bool) preg_match('/^_([a-zA-Z0-9_-])+$/', $this->title); } /** diff --git a/lam/templates/pdfedit/pdfpage.php b/lam/templates/pdfedit/pdfpage.php index b6e77381..eb1c8b31 100644 --- a/lam/templates/pdfedit/pdfpage.php +++ b/lam/templates/pdfedit/pdfpage.php @@ -553,14 +553,14 @@ function addSection(&$structure) { } else { $section = new PDFEntrySection($_POST['new_section_text']); - array_splice($sections, $_POST['add_text_position'], 0, array($section)); + array_splice($sections, $_POST['add_sectionText_position'], 0, array($section)); $structure->setSections($sections); } } // Add a new section with item as headline elseif(isset($_POST['add_section'])) { $section = new PDFEntrySection('_' . $_POST['new_section_item']); - array_splice($sections, $_POST['add_text_position'], 0, array($section)); + array_splice($sections, $_POST['add_section_position'], 0, array($section)); $structure->setSections($sections); } }