View Issue Details

IDProjectCategoryView StatusLast Update
0031159mantisbttaggingpublic2022-11-16 02:15
Reporterlutterbach Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.25.5 
Target Version2.25.6Fixed in Version2.25.6 
Summary0031159: Undefined constants TAG_NOT_ATTACHED + TAG_ALREADY_ATTACHED in tag_api.php
Description

My editor complains about these missing constants in triggererror calls. I guess these require to be prepended with "ERROR".

function tag_bug_detach + function tag_bug_get_row:
trigger_error( TAG_NOT_ATTACHED, ERROR ); ->trigger_error(ERROR_TAG_NOT_ATTACHED, ERROR);

function tag_bug_attach:
trigger_error( TAG_ALREADY_ATTACHED, ERROR ); -> trigger_error(ERROR_TAG_ALREADY_ATTACHED, ERROR);

Sorry, no simple diffs as I have different formatting + some minor changes (cut out all tag history)

TagsNo tags attached.

Activities

dregad

dregad

2022-10-19 05:30

developer   ~0067086

Thanks, good catch.

These invalid constants have been present since Tag API's day 1 (2007/2008)...

lutterbach

lutterbach

2022-10-19 07:04

reporter   ~0067087

Thanks. That was quick :)

dregad

dregad

2022-10-19 07:40

developer   ~0067088

Easy fix and I had a few minutes, so...

Related Changesets

MantisBT: master 6ab193b9

2022-10-19 05:49

dregad


Details Diff
Fix undefined constants in tag_api.php

TAG_NOT_ATTACHED -> ERROR_TAG_NOT_ATTACHED
TAG_ALREADY_ATTACHED -> ERROR_TAG_ALREADY_ATTACHED

Fixes 0031159
Affected Issues
0031159
mod - core/tag_api.php Diff File