mikehaertl/phpwkhtmltopdf — pull request #48 by hkdennis2k (2014-05-14 03:22:16+00:00)
Title: Workaround escapeshellarg ignore empty string

escapeshellarg() return empty space for '', null, and false.
That could be a unwanted behavior and create bugs with using --post.

E.g.
$pdf=new WkHtmlToPdf(array('post'=>array('a'=>1', 'b'=>'', 'c'=>false));
$pdf->addPage('http://example.com');

Without the patch, "Failed loading page http://c" could be generated as it produce a command
"--post 'a' '1' --post 'b' --post 'c' http://example.com" /tmp/tmp
that will be parsed as
--post 'a' '1'
--post 'b' --post
'c' http://example.com
/tmp/tmp