diff --git a/fillpdf.module b/fillpdf.module index 2348ce5dc194a364042cf680cadccdf842315fce..0fc1cb5d79670544ac08c761314c113061b17c94 100644 --- a/fillpdf.module +++ b/fillpdf.module @@ -1546,8 +1546,14 @@ function fillpdf_execute_merge($method, array $fields, $fillpdf, $mode = 'url', ob_start(); passthru(implode(' ', $pdftk_command)); $data = ob_get_clean(); + + $error = NULL; if ($data === FALSE) { - drupal_set_message(t('pdftk not properly installed. No PDF generated.'), 'error'); + $error = t('pdftk not properly installed. No PDF generated.'); + } + if ($error) { + drupal_set_message($error, 'error'); + watchdog('fillpdf', $error, array(), WATCHDOG_ERROR); } file_unmanaged_delete($xfdffile); break;