From 93d006cf6bc948d96f450d42d70784af2b4276d0 Mon Sep 17 00:00:00 2001 From: codemasher Date: Sat, 4 Apr 2020 19:40:07 +0200 Subject: [PATCH] :octocat: HTML output: add "class" attribute only when $cssClass is non-empty --- src/Output/QRMarkup.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Output/QRMarkup.php b/src/Output/QRMarkup.php index 8eb83e0ed..ec6a74ff3 100644 --- a/src/Output/QRMarkup.php +++ b/src/Output/QRMarkup.php @@ -54,7 +54,12 @@ class QRMarkup extends QROutputAbstract{ * HTML output */ protected function html():string{ - $html = '
'.$this->options->eol; + + $html = empty($this->options->cssClass) + ? '
' + : '
'; + + $html .= $this->options->eol; foreach($this->matrix->matrix() as $row){ $html .= '
';