Fixed issues with EEPROM file extensions.
This commit is contained in:
parent
55918d5cab
commit
a8359af2e3
1 changed files with 3 additions and 1 deletions
|
@ -61,7 +61,9 @@ final class EEPROMLookup implements \Uiharu\ILookup {
|
|||
|
||||
if(!isset($fileId))
|
||||
throw new RuntimeException('Was unable to find EEPROM file id.');
|
||||
if(!preg_match('#^([A-Za-z0-9-_]+)$#', $fileId))
|
||||
|
||||
$fileId = pathinfo($fileId, PATHINFO_FILENAME);
|
||||
if(!is_string($fileId) || !preg_match('#^([A-Za-z0-9-_]+)$#', $fileId))
|
||||
throw new RuntimeException('Invalid EEPROM file id format.');
|
||||
|
||||
$fileInfo = $this->rawLookup($fileId);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue