Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-864

Failure to insert FALSE into a bool column

    Details

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

      Description

      I have experienced this problem with MySQL, I am not sure how it behaves with other platforms. Also, maybe this duplicates http://www.doctrine-project.org/jira/browse/DBAL-630 but since that issue is specifically about PostreSQL I am creating a separate one.

      [Doctrine\DBAL\Exception\DriverException]
      An exception occurred while executing 'INSERT INTO ACL_Authorization
      (role_id, securityIdentity_id, parentAuthorization_id, entity_class, entity_id, cascadable)
      VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'
      with params [2, 2, null, "Account\\Domain\\Account", 2, false]:
      
      SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'cascadable' at row 1
      

      I think it's related to https://bugs.php.net/bug.php?id=49255 (PDO fails to insert boolean FALSE to MySQL in prepared statement) which casts FALSE into an empty string.

        Activity

        Matthieu Napoli created issue -
        Steve Müller made changes -
        Field Original Value New Value
        Assignee Benjamin Eberlei [ beberlei ] Steve Müller [ deeky666 ]
        Steve Müller made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Invalid [ 6 ]

          People

          • Assignee:
            Steve Müller
            Reporter:
            Matthieu Napoli
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: