Skip to content

Commit 0dcaa3c

Browse files
kyrylokulyhinbarryvdh
authored andcommitted
Fix error with new PHP versions 'Parameter must be an array or an object that implements Countable' (barryvdh#381)
1 parent 58ddbe7 commit 0dcaa3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PDF.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ protected function render(){
201201

202202
if ( $this->showWarnings ) {
203203
global $_dompdf_warnings;
204-
if(count($_dompdf_warnings)){
204+
if(!empty($_dompdf_warnings) && count($_dompdf_warnings)){
205205
$warnings = '';
206206
foreach ($_dompdf_warnings as $msg){
207207
$warnings .= $msg . "\n";

0 commit comments

Comments
 (0)