Commit e1ec6f62 authored by jcnventura's avatar jcnventura

Issue #1151176 by Shawn_Smiley: fix undefined offset in _print_pdf_wkhtmltopdf_version().

parent 3c3942a2
......@@ -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]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment