-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DoctrineBridge] Fixed non-utf-8 recognition #7392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
saro0h
commented
Mar 15, 2013
Q | A |
---|---|
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | #7297 |
👍 |
👎 |
travis test is failing https://travis-ci.org/symfony/symfony/jobs/5529163#L225 |
@@ -56,7 +56,7 @@ public function startQuery($sql, array $params = null, array $types = null) | |||
} | |||
|
|||
// non utf-8 strings break json encoding | |||
if (null === preg_match('#[^\p{L}\p{N} ]#u', $params[$index])) { | |||
if (false === preg_match('#[^\p{L}\p{N} ]#u', $params[$index])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be if (!preg_match(
The return values of preg_match are
false
if the regex is invalid0
if the regex does not match1
if the regex matches
if there is any regression it could help to write a new failing test first. |
@pborreli the test was already failing |
@jfsimon ah ok, well it still fails 😃 |
@jfsimon if this is true I gives: 👍 |
@saro0h \o/ |
👍 |
This PR was squashed before being merged into the 2.1 branch (closes #7392). Commits ------- 67fbbac [DoctrineBridge] Fixed non-utf-8 recognition Discussion ---------- [DoctrineBridge] Fixed non-utf-8 recognition | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #7297 --------------------------------------------------------------------------- by jfsimon at 2013-03-15T15:10:28Z :+1: --------------------------------------------------------------------------- by francisbesset at 2013-03-15T15:17:17Z :-1: --------------------------------------------------------------------------- by pborreli at 2013-03-15T15:21:10Z travis test is failing https://travis-ci.org/symfony/symfony/jobs/5529163#L225 --------------------------------------------------------------------------- by pborreli at 2013-03-15T15:35:31Z if there is any regression it could help to write a new failing test first. --------------------------------------------------------------------------- by jfsimon at 2013-03-15T15:55:52Z @pborreli the test was already failing --------------------------------------------------------------------------- by pborreli at 2013-03-15T15:58:52Z @jfsimon ah ok, well it still fails 😃 --------------------------------------------------------------------------- by francisbesset at 2013-03-15T16:00:39Z @jfsimon if this is true I gives: 👍 --------------------------------------------------------------------------- by jfsimon at 2013-03-15T16:14:47Z @saro0h \o/ --------------------------------------------------------------------------- by pborreli at 2013-03-15T16:16:54Z :+1: