diff --git a/src/Utils/Lookup.php b/src/Utils/Lookup.php index 37f74b5..c633c4d 100644 --- a/src/Utils/Lookup.php +++ b/src/Utils/Lookup.php @@ -110,6 +110,11 @@ public static function resourceOpcode( $opcode = $opcode->getValue(); } if (is_string($opcode)) { + if ($opcode === '') { + throw new EmptyArgumentException( + 'OPCODE could not be empty string or whitespace only' + ); + } $opcode = strtoupper(trim($opcode)); $code = self::OPCODE_LIST[$opcode]??null; if (!$opcode) {