Bug #3793
closedText field update logs fail when all numbers
Description
If a text field has only digits in it is is not logged properly.
Example
000 evaluates to an empty field.
Updated by nant almost 12 years ago
Updated by nant almost 12 years ago
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) {
Updated by nant almost 12 years ago
Yup - this seems to fix the issue and not cause other issues.