Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Mpdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface

var $directionality;

var $extgstates; // Used for alpha channel - Transparency (Watermark)
var $extgstates = []; // Used for alpha channel - Transparency (Watermark)
var $mgl;
var $mgt;
var $mgr;
Expand Down
11 changes: 11 additions & 0 deletions tests/Mpdf/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ public function testDefaultSettings()
$this->assertFalse($mpdf->autoPadding);
}

/**
* The writers count() this before anything has drawn, so an instance that never ran the
* constructor - a partial mock, say - must still find an array here
*/
public function testExtgstatesDefaultsToAnArray()
{
$mpdf = (new \ReflectionClass(Mpdf::class))->newInstanceWithoutConstructor();

$this->assertSame([], $mpdf->extgstates);
}

public function testOverwrittenSettings()
{
$mpdf = new Mpdf([
Expand Down
Loading