ignore non-existent entries
This commit is contained in:
parent
d8806f3cae
commit
9fc4b4f946
|
@ -117,19 +117,21 @@ function createModulePDF($accounts,$pdf_structure="default") {
|
||||||
elseif($entry['tag'] == "ENTRY") {
|
elseif($entry['tag'] == "ENTRY") {
|
||||||
// Get name of current entry
|
// Get name of current entry
|
||||||
$name = $entry['attributes']['NAME'];
|
$name = $entry['attributes']['NAME'];
|
||||||
|
// skip non-existent entries
|
||||||
// Get current entry
|
if (isset($entries[$name])) {
|
||||||
$value_entry = $entries[$name];
|
// Get current entry
|
||||||
|
$value_entry = $entries[$name];
|
||||||
// Print entry only when module sumitted values for it
|
|
||||||
if(is_array($value_entry)) {
|
// Print entry only when module sumitted values for it
|
||||||
// Loop over all rows of this entry (most of the time this will be just one)
|
if(is_array($value_entry)) {
|
||||||
foreach($value_entry as $line) {
|
// Loop over all rows of this entry (most of the time this will be just one)
|
||||||
// Substitue XML syntax with valid FPDF methods
|
foreach($value_entry as $line) {
|
||||||
$methods = processLine($line,true,$fontName);
|
// Substitue XML syntax with valid FPDF methods
|
||||||
// Call every method
|
$methods = processLine($line,true,$fontName);
|
||||||
foreach($methods as $method) {
|
// Call every method
|
||||||
call_user_func_array(array(&$pdf,$method[0]),$method[1]);
|
foreach($methods as $method) {
|
||||||
|
call_user_func_array(array(&$pdf,$method[0]),$method[1]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue