I have think that before,  but I use my code after I tried to handle 0


On Wed, May 21, 2014 at 3:27 PM, Michael Härtl <notifications@github.com>wrote:

> In WkHtmlToPdf.php:
>
> > @@ -391,7 +391,11 @@ protected function renderOptions($options)
> >       */
> >      protected function escape($val)
> >      {
> > -        return $this->enableEscaping ? escapeshellarg($val) : $val;
> > +        $val=(string)$val;
> > +        if($this->enableEscaping){
> > +            return (''==$val) ? "''" : escapeshellarg($val);
> > +        }
> > +        return $val;
>
> I think, we should simply check for an empty string here:
>
> if ($this->enableEscaping) {
>     return $val==='' ? "''" : escapeshellarg($val);
> } else {
>     return $val;
> }
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/mikehaertl/phpwkhtmltopdf/pull/48/files#r12883641>
> .
>