Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-490

[GH-303] Fixed a PHP warning in DBALException::driverExceptionDuringQuery()

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3.4
    • Component/s: None
    • Security Level: All
    • Labels:
      None

      Description

      This issue is created automatically through a Github pull request on behalf of BenMorel:

      Url: https://github.com/doctrine/dbal/pull/303

      Message:

      When a query parameter contains binary data, `driverExceptionDuringQuery()` generates a PHP warning. This is because it internally uses `json_encode()`, which expects valid UTF-8 strings (at least in PHP 5.4.13).

      This PR removes the warning with the `@` operator. `json_encode()` will still return a string representation, replacing the binary data with `null`.

      I added a test that fails before the fix.

        Activity

        Hide
        Doctrine Bot added a comment -

        A related Github Pull-Request [GH-303] was closed:
        https://github.com/doctrine/dbal/pull/303

        Show
        Doctrine Bot added a comment - A related Github Pull-Request [GH-303] was closed: https://github.com/doctrine/dbal/pull/303

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Doctrine Bot
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: