Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-2773

Configure PDO to cause exceptions on erroneous queries

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.0.0, 4.1.0, 4.2.0, 4.3.0
    • Fix Version/s: 4.3.1
    • Component/s: None
    • Labels:
      None

      Description

      See https://www.blesta.com/forums/index.php?/topic/11795-pdo-not-throwing-exceptions-on-errors/

      PDO is configured to fail silently due to PDO::ATTR_ERRMODE set to 0 (silent). It should be set to PDO::ERRMODE_EXCEPTION (2) to throw exceptions for erroneous queries.

        Activity

        tyson Tyson Phillips (Inactive) created issue -
        tyson Tyson Phillips (Inactive) made changes -
        Field Original Value New Value
        Rank Ranked higher
        tyson Tyson Phillips (Inactive) made changes -
        Sprint 4.4.0 Sprint 1 [ 64 ]
        tyson Tyson Phillips (Inactive) made changes -
        Rank Ranked lower
        tyson Tyson Phillips (Inactive) made changes -
        Rank Ranked higher
        tyson Tyson Phillips (Inactive) made changes -
        Rank Ranked lower
        tyson Tyson Phillips (Inactive) made changes -
        Fix Version/s 4.3.1 [ 11104 ]
        Fix Version/s 4.4.0-b1 [ 11105 ]
        tyson Tyson Phillips (Inactive) made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        tyson Tyson Phillips (Inactive) made changes -
        Description See https://www.blesta.com/forums/index.php?/topic/11795-pdo-not-throwing-exceptions-on-errors/

        PDO being used by Blesta to run queries is not configured to cause exceptions when errors are encountered.
        See https://www.blesta.com/forums/index.php?/topic/11795-pdo-not-throwing-exceptions-on-errors/

        PDO is configured to fail silently due to PDO::ATTR_ERRMODE set to 0 (silent). It should be set to PDO::ERRMODE_EXCEPTION (2) to throw exceptions for erroneous queries.
        Automated transition triggered when Tyson Phillips (Inactive) created pull request #494 in Stash -
        Status In Progress [ 3 ] In Review [ 5 ]
        Resolution Fixed [ 1 ]
        tyson Tyson Phillips (Inactive) made changes -
        Remaining Estimate 0 minutes [ 0 ]
        Time Spent 51 minutes [ 3060 ]
        Worklog Id 11377 [ 11377 ]
        tyson Tyson Phillips (Inactive) made changes -
        Summary Configure PDO to cause exceptions on errorneous queries Configure PDO to cause exceptions on erroneous queries
        Automated transition triggered when Tyson Phillips (Inactive) merged pull request #494 in Stash -
        Status In Review [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            tyson Tyson Phillips (Inactive)
            Reporter:
            tyson Tyson Phillips (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              13/Aug/18

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 51 minutes
              51m

                Agile