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

Quantity package options without a min/max cause PDO error

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3.2
    • Component/s: None
    • Labels:
      None

      Description

      When creating a package option as an admin (probably edit too, but haven't tested), setting it to "Quantity" and setting all fields to validate, but leaving "Min" and "Max" blank will lead to an error:

      SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'min' at row 1 on line 196 in \vendors\minphp\db\src\PdoConnection.php

      Printing Stack Trace:
      #0 \vendors\minphp\db\src\PdoConnection.php(196): PDOStatement->execute(Array)
      #1 \vendors\minphp\record\src\Record.php(275): Minphp\Db\PdoConnection->query('INSERT INTO `pa...', Array)
      #2 \app\models\package_options.php(555): Minphp\Record\Record->insert('package_option_...', Array, Array)
      #3 \app\models\package_options.php(330): PackageOptions->addOptionValues('28', '1', Array)
      #4 \app\controllers\admin_package_options.php(168): PackageOptions->add(Array)
      #5 \vendors\minphp\bridge\src\Lib\Dispatcher.php(143): AdminPackageOptions->add()
      #6 \index.php(21): Dispatcher::dispatch('/blesta-minphp/...')
      #7

      Unknown macro: {main}

        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 3 [ 59 ]
        tyson Tyson Phillips (Inactive) made changes -
        Rank Ranked higher
        tyson Tyson Phillips (Inactive) made changes -
        Rank Ranked higher
        tyson Tyson Phillips (Inactive) made changes -
        Rank Ranked higher
        tyson Tyson Phillips (Inactive) made changes -
        Assignee Tyson Phillips [ tyson ]
        Automated transition triggered when Tyson Phillips (Inactive) created a branch in Stash -
        Status Open [ 1 ] In Progress [ 3 ]
        Automated transition triggered when Tyson Phillips (Inactive) created pull request #513 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 36 minutes [ 2160 ]
        Worklog Id 11431 [ 11431 ]
        Automated transition triggered when Tyson Phillips (Inactive) merged pull request #513 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:
              27/Aug/18

              Time Tracking

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

                Agile