Skip to content

Commit 022d052

Browse files
committed
Update RegularExpressionPatternRule.php
1 parent 5cd62c8 commit 022d052

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/Rules/Regexp/RegularExpressionPatternRule.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ private function validatePattern(string $pattern): ?string
133133
throw new ShouldNotHappenException();
134134
}
135135
// strip invalid utf-8 pattern contents to keep the error message NEON parsable.
136-
return substr($e->getMessage(), 0, $patternPos);
136+
return substr($e->getMessage(), 0, $patternPos + strlen('pattern:') - 1);
137137
}
138138
return $e->getMessage();
139139
}

0 commit comments

Comments
 (0)