Skip to content

Commit

Permalink
Merge pull request #94 from pyrech/remove-silencing-error
Browse files Browse the repository at this point in the history
Fix hhvm error message not including the name of the function
  • Loading branch information
Loïc Chardonnet committed Nov 16, 2014
2 parents bdacb10 + 51456bf commit 5c485b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Gnugat/Redaktilo/Search/LineRegexSearchStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function supports($pattern)
// Remove the warning generated by preg_match when the pattern is not valid
$errorHandler = null;
$errorHandler = set_error_handler(function ($errno, $errstr) use (&$errorHandler) {
if (false !== strpos($errstr, 'preg_match')) {
if (false !== preg_match('/(delimiter|regex|regular expression|modifier|pattern)/', $errstr)) {
return;
}
if ($errorHandler) {
Expand Down

0 comments on commit 5c485b6

Please sign in to comment.