Bug #3793
closed
Text field update logs fail when all numbers
Added by nant almost 12 years ago.
Updated almost 12 years ago.
Start date:
27 November 2012
Description
If a text field has only digits in it is is not logged properly.
Example
000 evaluates to an empty field.
Looks like this is due to the following PHP comparison issue:
http://php.net/manual/en/language.operators.comparison.php
If you compare a number with a string or the comparison involves numerical strings, then each string is converted to a number and the comparison performed numerically. These rules also apply to the switch statement. The type conversion does not take place when the comparison is === or !== as this involves comparing the type as well as the value.
So solutions seems to be:
cb.pulog.php line 605
change
if ($oA->$sKey != $oB->$sKey) {
to
if ((string) $oA->$sKey !== (string) $oB->$sKey) {
Yup - this seems to fix the issue and not cause other issues.
- Status changed from Assigned to Resolved
- Target version changed from 1.5 to 1.4.1
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF