From 737eeff3addb9921972a3bc2d39153b07b63b689 Mon Sep 17 00:00:00 2001 From: KhanhIceTea Date: Mon, 21 Jan 2019 16:07:39 +0700 Subject: [PATCH] PCRE2 fix for PHP 7.3+ PCRE2 is strict that the hyphen needs to be moved to the end, or escaped for this to work. --- src/Bernard/Message/DefaultMessage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bernard/Message/DefaultMessage.php b/src/Bernard/Message/DefaultMessage.php index e4b5f70c..d36fb9f6 100644 --- a/src/Bernard/Message/DefaultMessage.php +++ b/src/Bernard/Message/DefaultMessage.php @@ -19,7 +19,7 @@ public function __construct($name, array $parameters = array()) $this->$k = $v; } - $this->name = preg_replace('/(^([0-9]+))|([^[:alnum:]-_+])/i', '', $name); + $this->name = preg_replace('/(^([0-9]+))|([^[:alnum:]\-_+])/i', '', $name); } /**