Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[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

Closed
wants to merge 2 commits into from

Conversation

saro0h
Copy link
Contributor

@saro0h saro0h commented Mar 15, 2013

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #7297

@jfsimon
Copy link
Contributor

jfsimon commented Mar 15, 2013

👍

@francisbesset
Copy link
Contributor

👎

@pborreli
Copy link
Contributor

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])) {
Copy link
Member

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 invalid
  • 0 if the regex does not match
  • 1 if the regex matches

@pborreli
Copy link
Contributor

if there is any regression it could help to write a new failing test first.

@jfsimon
Copy link
Contributor

jfsimon commented Mar 15, 2013

@pborreli the test was already failing

@pborreli
Copy link
Contributor

@jfsimon ah ok, well it still fails 😃

@francisbesset
Copy link
Contributor

@jfsimon if this is true I gives: 👍

@jfsimon
Copy link
Contributor

jfsimon commented Mar 15, 2013

@saro0h \o/

@pborreli
Copy link
Contributor

👍

fabpot added a commit that referenced this pull request Mar 16, 2013
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:
@fabpot fabpot closed this Mar 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants