Fix to handle wrong pecl versions with hyphen

This commit is contained in:
Shivam Mathur
2021-12-08 04:56:29 +05:30
parent f4d1db5c23
commit a274bd910a
5 changed files with 10 additions and 5 deletions

View File

@ -292,7 +292,7 @@ export async function extensionArray(
return extension
.trim()
.toLowerCase()
.replace(/^(:)?(php[-_]|none|zend )/, '$1');
.replace(/^(:)?(php[-_]|none|zend )|(-[^-]*)-/, '$1$3');
})
].filter(Boolean);
}