Skip to content

Commit

Permalink
Merge pull request #155 from hihaho/master
Browse files Browse the repository at this point in the history
security update for the dompdf/dompdf vulnerability
  • Loading branch information
mc0de authored Aug 1, 2022
2 parents bb444db + c8743a5 commit 7a98144
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"keywords": ["Laravel", "Invoice", "Invoices", "PDF"],
"require": {
"php": "^7.3|^8.0",
"barryvdh/laravel-dompdf": "^1",
"barryvdh/laravel-dompdf": "^v2.0",
"illuminate/http": "^5.5|^6|^7|^8|^9",
"illuminate/support": "^5.5|^6|^7|^8|^9"
},
Expand Down
6 changes: 3 additions & 3 deletions src/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace LaravelDaily\Invoices;

use Barryvdh\DomPDF\Facade as PDF;
use Barryvdh\DomPDF\Facade\Pdf;
use Carbon\Carbon;
use Exception;
use Illuminate\Http\Response;
Expand Down Expand Up @@ -131,7 +131,7 @@ class Invoice
public $table_columns;

/**
* @var PDF
* @var Pdf
*/
public $pdf;

Expand Down Expand Up @@ -257,7 +257,7 @@ public function render()
$view = View::make($template, ['invoice' => $this]);
$html = mb_convert_encoding($view, 'HTML-ENTITIES', 'UTF-8');

$this->pdf = PDF::setOptions(['enable_php' => true])->loadHtml($html);
$this->pdf = Pdf::setOptions(['enable_php' => true])->loadHtml($html);
$this->output = $this->pdf->output();

return $this;
Expand Down

0 comments on commit 7a98144

Please sign in to comment.