Skip to content

Commit 94becce

Browse files
committed
:octocat:
1 parent 0f31e08 commit 94becce

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/Output/QROutputAbstract.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,17 @@ protected function setModuleValues():void{
9494
/**
9595
* Returns the prepared value for the given $M_TYPE
9696
*
97-
* @return mixed|null return value depends on the output class
97+
* @return mixed|null return value depends on the output class, null if $moduleValues[$M_TYPE] doesn't exist
98+
* @throws \chillerlan\QRCode\Output\QRCodeOutputException
9899
*/
99100
protected function getModuleValue(int $M_TYPE){
100-
return ($this->moduleValues[$M_TYPE] ?? null);
101+
102+
if(!isset($this->moduleValues[$M_TYPE])){
103+
return null;
104+
# throw new QRCodeOutputException(sprintf('invalid M_TYPE: %024b', $M_TYPE));
105+
}
106+
107+
return $this->moduleValues[$M_TYPE];
101108
}
102109

103110
/**

0 commit comments

Comments
 (0)