1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2025-11-09 13:10:24 +01:00

🐛 Fix #45: Adjusted regex to support spaces

This commit is contained in:
2021-06-07 19:13:52 +02:00
parent f881f07cba
commit 23720c5dc9
4 changed files with 20 additions and 7 deletions

View File

@@ -46,7 +46,7 @@ class PhpExtension {
- Note: Extensions that are disabled in a different way will not be detected. This is intentional.
*/
static let extensionRegex = #"^(extension=|zend_extension=|; extension=|; zend_extension=)(?<name>["]?(?:\/?.\/?)+(?:\.so)"?)$"#
static let extensionRegex = #"^((\s?)extension|(\s?)zend_extension|;(\s?)extension|;(\s?)zend_extension)(\s?)(=)(\s?)(?<name>["]?(?:\/?.\/?)+(?:\.so)"?)$"#
/**
When registering an extension, we do that based on the line found inside the .ini file.