mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-11-24 04:12:39 +00:00
:octocat: require only either $logoSpaceWidth or $logoSpaceHeight
This commit is contained in:
+11
-2
@@ -231,9 +231,18 @@ class QRCode{
|
||||
|
||||
// add matrix modifications after mask pattern evaluation and before handing over to output
|
||||
if($this->options->addLogoSpace){
|
||||
$logoSpaceWidth = $this->options->logoSpaceWidth;
|
||||
$logoSpaceHeight = $this->options->logoSpaceHeight;
|
||||
|
||||
// check whether one of the dimensions was omitted
|
||||
if($logoSpaceWidth === null || $logoSpaceHeight === null){
|
||||
$logoSpaceWidth = $logoSpaceWidth ?? $logoSpaceHeight ?? 0;
|
||||
$logoSpaceHeight = null;
|
||||
}
|
||||
|
||||
$matrix->setLogoSpace(
|
||||
$this->options->logoSpaceWidth,
|
||||
$this->options->logoSpaceHeight,
|
||||
$logoSpaceWidth,
|
||||
$logoSpaceHeight,
|
||||
$this->options->logoSpaceStartX,
|
||||
$this->options->logoSpaceStartY
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user