From 23a7e851eb257e97c8bdcd8e4ab72043d96df389 Mon Sep 17 00:00:00 2001 From: codemasher Date: Tue, 13 Mar 2018 18:16:02 +0100 Subject: [PATCH] :octocat: added link to https://github.com/chillerlan/php-qrcode/issues/15 --- src/QRCode.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/QRCode.php b/src/QRCode.php index 625d994bf..f467419af 100755 --- a/src/QRCode.php +++ b/src/QRCode.php @@ -161,9 +161,10 @@ class QRCode{ * @throws \chillerlan\QRCode\Data\QRCodeDataException */ public function getMatrix(string $data):QRMatrix { - //NOTE: input sanitization should be done outside - //$data = trim($data); - + // https://github.com/chillerlan/php-qrcode/pull/15 + // NOTE: input sanitization should be done outside + // $data = trim($data); + if(empty($data)){ throw new QRCodeDataException('QRCode::getMatrix() No data given.'); }