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/...')
#7Unknown macro: {main}