From d1db940ade073b02bb1ca3a32e315d1cd635edb7 Mon Sep 17 00:00:00 2001 From: Richard Holloway Date: Wed, 11 Jan 2017 00:02:29 +0700 Subject: [PATCH] Only use extensions if a comma delimited list --- src/PHPCensor/Plugin/PhpParallelLint.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/PHPCensor/Plugin/PhpParallelLint.php b/src/PHPCensor/Plugin/PhpParallelLint.php index f3a6daeb..5fa044bb 100644 --- a/src/PHPCensor/Plugin/PhpParallelLint.php +++ b/src/PHPCensor/Plugin/PhpParallelLint.php @@ -59,7 +59,11 @@ class PhpParallelLint extends Plugin } if (isset($options['extensions'])) { - $this->extensions = $options['extensions']; + // Only use if this is a comma delimited list + $pattern = '/^[a-z]*,\\ *[a-z]*$/'; + if (preg_match($pattern, $options['extensions'])) { + $this->extensions = $options['extensions']; + } } }