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
 | ||||||
|  | 				if (isset($entries[$name])) { | ||||||
|  | 					// Get current entry
 | ||||||
|  | 					$value_entry = $entries[$name]; | ||||||
| 					 | 					 | ||||||
| 				// Get current entry
 | 					// Print entry only when module sumitted values for it
 | ||||||
| 				$value_entry = $entries[$name]; | 					if(is_array($value_entry)) { | ||||||
| 				 | 						// Loop over all rows of this entry (most of the time this will be just one)
 | ||||||
| 				// Print entry only when module sumitted values for it
 | 						foreach($value_entry as $line) { | ||||||
| 				if(is_array($value_entry)) { | 							// Substitue XML syntax with valid FPDF methods
 | ||||||
| 					// Loop over all rows of this entry (most of the time this will be just one)
 | 							$methods = processLine($line,true,$fontName); | ||||||
| 					foreach($value_entry as $line) { | 							// Call every method
 | ||||||
| 						// Substitue XML syntax with valid FPDF methods
 | 							foreach($methods as $method) { | ||||||
| 						$methods = processLine($line,true,$fontName); | 								call_user_func_array(array(&$pdf,$method[0]),$method[1]); | ||||||
| 						// Call every method
 | 							} | ||||||
| 						foreach($methods as $method) { |  | ||||||
| 							call_user_func_array(array(&$pdf,$method[0]),$method[1]); |  | ||||||
| 						} | 						} | ||||||
| 					} | 					} | ||||||
| 				} | 				} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue