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

Issue #1866174: Improve comments

parent b63cc806
No related branches found
No related tags found
No related merge requests found
......@@ -2009,7 +2009,13 @@ function fillpdf_load($fid, $reset = FALSE, $process_replacements = TRUE) {
}
/**
* Test whether the pdftk path is valid.
*
* @param string $pdftk_path
* The path to test.
*
* @return bool
* TRUE if the path is the pdftk binary, FALSE otherwise.
*/
function fillpdf_pdftk_check($pdftk_path = 'pdftk') {
// An empty value means we should leave it to the PATH.
......@@ -2019,6 +2025,7 @@ function fillpdf_pdftk_check($pdftk_path = 'pdftk') {
$output = array();
$status = NULL;
exec($pdftk_path, $output, $status);
// Check the exit status.
if (in_array($status, array(126, 127))) {
return FALSE;
}
......
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