[interchange-bugs] [rt.icdevgroup.org #350] SystemTag/assign.coretag parsing an int
Anonymous via RT
interchange at rt.icdevgroup.org
Mon Mar 19 15:56:53 UTC 2012
Mon Mar 19 15:56:53 2012: Request 350 was acted upon.
Transaction: Ticket created by guest
Queue: Interchange
Subject: SystemTag/assign.coretag parsing an int
Owner: Nobody
Requestors:
Status: new
Ticket <URL: http://rt.icdevgroup.org/Ticket/Display.html?id=350 >
interchange/code/SystemTag/assign.coretag tries to detect illegal assignments of non-numbers to numeric database fields. The validation is wrong, resulting in many "Attempted assign of non-numeric" warnings.
A better check would be:
- if($value =~ /^-?\d+\.?\d*$/ )
+ if($value =~ m/ ^[+-]?[0-9]+$ | ^[+-]?[0-9]*\.[0-9]+$ /x ) {
Mind you: \d ~= [0-9]
By the way: this fix broke quite some code in my instance. Handle with care!
More information about the interchange-bugs
mailing list