Skip to content

Commit 7a98144

Browse files
authored
Merge pull request #155 from hihaho/master
security update for the dompdf/dompdf vulnerability
2 parents bb444db + c8743a5 commit 7a98144

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"keywords": ["Laravel", "Invoice", "Invoices", "PDF"],
1515
"require": {
1616
"php": "^7.3|^8.0",
17-
"barryvdh/laravel-dompdf": "^1",
17+
"barryvdh/laravel-dompdf": "^v2.0",
1818
"illuminate/http": "^5.5|^6|^7|^8|^9",
1919
"illuminate/support": "^5.5|^6|^7|^8|^9"
2020
},

src/Invoice.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace LaravelDaily\Invoices;
44

5-
use Barryvdh\DomPDF\Facade as PDF;
5+
use Barryvdh\DomPDF\Facade\Pdf;
66
use Carbon\Carbon;
77
use Exception;
88
use Illuminate\Http\Response;
@@ -131,7 +131,7 @@ class Invoice
131131
public $table_columns;
132132

133133
/**
134-
* @var PDF
134+
* @var Pdf
135135
*/
136136
public $pdf;
137137

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

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

263263
return $this;

0 commit comments

Comments
 (0)