Skip to content
Snippets Groups Projects
Commit 5cf24e60 authored by Liam Morland's avatar Liam Morland
Browse files

Issue #3036845: Call watchdog() when pdftk not properly installed

parent dab1d11f
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment