diff --git a/views_pdf_template.php b/views_pdf_template.php index 98ff23b..4000cfc 100644 --- a/views_pdf_template.php +++ b/views_pdf_template.php @@ -473,7 +473,10 @@ class PdfTemplate extends FPDI { $fitcell = FALSE; // Run eval before - php_eval($options['render']['eval_before']); + if (!empty($options['render']['eval_before']) && module_exists("php")) { + php_eval($options['render']['eval_before']); + } + // Add css if there is a css file set and stripHTML is not // active @@ -503,8 +506,9 @@ class PdfTemplate extends FPDI { $this->SetFont($this->defaultFontFamily, implode('', $this->defaultFontStyle), $this->defaultFontSize); // Run eval after - php_eval($options['render']['eval_after']); - + if (!empty($options['render']['eval_after']) && module_exists("php")) { + php_eval($options['render']['eval_after']); + } // Write Coordinates of element $this->elements[$key] = array(