KnpLabs/snappy — pull request #120 by trsteel88 (2014-11-03 01:02:02+00:00)
Title: Always return options to default

hasHtmlHeader and hasHtmlFooter must return to their default state each time handleOptions() is called. Otherwise, if you generate 2 pdf files within 1 request (1 with a footer and 1 without it will throw an error).

Consider the following:

```php
$snappyPdf->generateFromHtml($pdf1Html, $pdf1File, array(
'page-size' => 'A5',
'margin-right' => 0,
'margin-left' => 0,
'footer-html' => $footer
), true);

$snappyPdf->generateFromHtml($pdf2Html, $pdf2File, array(
'page-size' => 'A5',
'margin-right' => 0,
'margin-left' => 0
), true);

```

When the second pdf is generated the following error is generated:

```Notice: Undefined index: footer-html in /usr/local/zend/apache2/htdocs/lighting-illusions/v3/vendor/knplabs/knp-snappy/src/Knp/Snappy/Pdf.php line 66```

This is because the first file generated is changing the protected $hasHtmlFooter value to true but there is no footer available.