We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f31e08 commit 94becceCopy full SHA for 94becce
src/Output/QROutputAbstract.php
@@ -94,10 +94,17 @@ protected function setModuleValues():void{
94
/**
95
* Returns the prepared value for the given $M_TYPE
96
*
97
- * @return mixed|null return value depends on the output class
+ * @return mixed|null return value depends on the output class, null if $moduleValues[$M_TYPE] doesn't exist
98
+ * @throws \chillerlan\QRCode\Output\QRCodeOutputException
99
*/
100
protected function getModuleValue(int $M_TYPE){
- 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];
108
}
109
110
0 commit comments