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

        There are no comments yet on this issue.

          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