Skip to content

Commit c954db6

Browse files
authored
Reset scaled and length after toggling upscaled so as to prevent issues with subclasses that use the output from dump() (#275)
1 parent 22869ae commit c954db6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Output/QRGdImage.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ public function dump(string $file = null):string|GdImage{
163163
// scale down to the expected size
164164
$this->image = imagescale($this->image, ($this->length / 10), ($this->length / 10));
165165
$this->upscaled = false;
166+
// Reset scaled and length values after rescaling image to prevent issues with subclasses that use the output from dump()
167+
$this->setMatrixDimensions();
166168
}
167169

168170
// set transparency after scaling, otherwise it would be undone

0 commit comments

Comments
 (0)