View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update | 
|---|---|---|---|---|---|
| 0036263 | mantisbt | administration | public | 2025-08-13 08:44 | 2025-11-01 07:49 | 
| Reporter | vicsuarez | Assigned To | dregad | ||
| Priority | normal | Severity | crash | Reproducibility | always | 
| Status | closed | Resolution | fixed | ||
| Product Version | 2.27.0 | ||||
| Target Version | 2.27.2 | Fixed in Version | 2.27.2 | ||
| Summary | 0036263: Error editing categories with PostgreSQL: APPLICATION ERROR 401 | ||||
| Description | When submitting changes after editing a category (manage_proj_cat_update.php) MantisBT shows this error: 
  | ||||
| Steps To Reproduce | Go "Manage" > "Projects" and then: 
  | ||||
| Additional Information | "manage_proj_cat_update.php" script passes a boolean value to "$p_status" parameter of "category_update" method in "category_api.php", but in PostgreSQL you have no automatic cast from a boolean value to an integer value ("status" field is a numeric type in "mantis_category_table").  | ||||
| Tags | No tags attached. | ||||
| 
	 This is a regression introduced by 0031017. category_update() expects $p_status parameter to be int|null so I believe there is a missing type cast in manage_proj_cat_update.php line 78. I do not have access to a PostgreSQL instance at the moment so I can't test and confirm for sure. Until I do you may want to try this as a workaround, and let me know how it goes: 	 | 
|
| 
	 Patch fixes the problem. Thank you.  | 
|
| 
	 @dregad what do you think about reverting your change but changing  | 
|
| 
	
	 MantisBT: master-2.27 38a56985 2025-08-14 04:15 Details Diff  | 
Fix DB error updating category on PostgreSQL ERROR: invalid input syntax for type integer: "TRUE" for the query: UPDATE mantis_category_table SET name=$1, user_id=$2, status=$3 WHERE id=$4. Regression introduced by commit 05c1639f45bfc0c3392288930f37f351bfcfc7b9 (issue 0031017). Fixes 0036263  | 
Affected Issues 0031017, 0036263  | 
|
| mod - manage_proj_cat_update.php | Diff File | ||