Skip to content

Commit

Permalink
PCRE2 fix for PHP 7.3+
Browse files Browse the repository at this point in the history
PCRE2 is strict that the hyphen needs to be moved to the end, or escaped for this to work.
  • Loading branch information
khanhicetea committed Jan 21, 2019
1 parent c452caa commit 737eeff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Bernard/Message/DefaultMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 737eeff

Please sign in to comment.