From ca6127aeb7e5c0adadf50f1530ae0bf9b2f9cae3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ram=C3=B3n=20S=C3=A1nchez=20Morales?= Date: Fri, 26 Apr 2019 21:36:40 +0200 Subject: [PATCH] Update matcher.php --- src/matcher.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/matcher.php b/src/matcher.php index 050cac3..28c289a 100644 --- a/src/matcher.php +++ b/src/matcher.php @@ -20,7 +20,8 @@ function matcher($value, $pattern) if (($p = ltrim($pattern, ':')) != $pattern) foreach (explode(' ', $p) as $name) { if (substr($name, -1) == ')') { list($name, $args) = explode('(', $name); - $args = explode(',', rtrim($args, ')')); + $args = [rtrim($args, ')')]; + if ($name!='regexp') $args = explode(',', $args[0]); } if (is_callable(rules($name))) { if (!call_user_func_array(rules($name), array_merge([$value], $args))) {