Skip to content

Commit

Permalink
escape the delimiter before preg_match (#16309)
Browse files Browse the repository at this point in the history
  • Loading branch information
themsaid authored and taylorotwell committed Nov 8, 2016
1 parent db2cf50 commit 6b906e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Validation/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2790,7 +2790,7 @@ protected function dependsOnOtherFields($rule)
*/
protected function getExplicitKeys($attribute)
{
$pattern = str_replace('\*', '([^\.]+)', preg_quote($this->getPrimaryAttribute($attribute)));
$pattern = str_replace('\*', '([^\.]+)', preg_quote($this->getPrimaryAttribute($attribute), '/'));

if (preg_match('/^'.$pattern.'/', $attribute, $keys)) {
array_shift($keys);
Expand Down

0 comments on commit 6b906e3

Please sign in to comment.