summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--print_pdf/print_pdf.module3
1 files changed, 2 insertions, 1 deletions
diff --git a/print_pdf/print_pdf.module b/print_pdf/print_pdf.module
index e59f780..4a4b451 100644
--- a/print_pdf/print_pdf.module
+++ b/print_pdf/print_pdf.module
@@ -650,7 +650,8 @@ function _print_pdf_wkhtmltopdf_version() {
$cmd = realpath($print_pdf_pdf_tool) . ' --version';
$process = proc_open($cmd, $descriptor, $pipes, NULL, NULL);
if (is_resource($process)) {
- $out = preg_match('!.*?(\d+\.\d+\.\d+).*$!m', stream_get_contents($pipes[1]), $matches);
+ $content = stream_get_contents($pipes[1]);
+ $out = preg_match('!.*?(\d+\.\d+\.\d+).*$!m', $content, $matches);
fclose($pipes[0]);
fclose($pipes[1]);
fclose($pipes[2]);