Dolibarr ERP & CRM » Bugs » bug #828
Error when code_region is not a number in llx_c_regions (with postgres)Latest modifications
Answer now
Snapshot Details |
Submitted by: | damien clochard (daamien) | | Submitted on: | 2013-04-18 15:25 |
Last Modified On: | 2013-04-18 15:25 | | Dolibarr version: | 3.2.1 |
PHP version: | | | Database type and version: | postgresql |
OS Type/Version: | | | Category: | Other |
Severity: | 1 - Minor | |
Summary: | Error when code_region is not a number in llx_c_regions (with postgres) |
Description: |
Not a big problem but it would be cleaner if the input field was checked before inserting :-)
----------------------
1- go to https://erp.dalibo.info/admin/dict.php?id=3
2- Fill the form and put a string instead of a number in the code region code
3- click "add"
3- you get the following error
-----------------
2013-04-18 15:13:20 WARN 90.50.31.193 damien dict DoliDBPgsql::query SQL error usesavepoint = 0 - INSERT INTO llx_c_regions (code_region,nom,fk_pays,active) VALUES('ON','Ontario','14',1) - ERROR: 22P02: invalid input syntax for integer: "ON"
LINE 1: ...c_regions (code_region,nom,fk_pays,active) VALUES('ON','Onta...
^
LOCATION: pg_atoi, numutils.c:62 = DB_ERROR_22P02
2013-04-18 15:13:20 ERROR 90.50.31.193 damien dict Error url="" query_string=, sql=INSERT INTO llx_c_regions (code_region,nom,fk_pays,active) VALUES('ON','Ontario','14',1), db_error=ERROR: 22P02: invalid input syntax for integer: "ON"
LINE 1: ...c_regions (code_region,nom,fk_pays,active) VALUES('ON','Onta...
^
LOCATION: pg_atoi, numutils.c:62
-----------------
|
Step to reproduce bug: | |
Status |
Resolution: | Fixed | | Assigned to: | Marcos García (marcosgdf) |
Status: | Open | |
Comments- Marcos GarcĂa 2013-04-19 15:38
- The bug has been corrected. Pull request send inside GIT sources
(http://www.github.com/Dolibarr/dolibarr) and waiting to merge
into develop branch.
|
|
(http://www.github.com/Dolibarr/dolibarr) and waiting to merge
into develop branch.
None→ FixedNone→ Marcos García (marcosgdf)