Bugzilla – Bug 115560
tointeger("blah") returns 0
Last modified: 2005-11-24 17:08:06 UTC
tointeger("blah") returns 0 : should it? With this, tointeger cannot be used for checking if given string is convertible to integer.
Thats clearly a bug. nil should be returned. Will fix this after 10.0
later
Could someone do it?
The fix it not the problem. But how much existing code will break ? (we probably have to 'grep -r tointeger' across YaST ...)
If this is the correct behaviour, I think it should be changed and we will see what relies on the incorrect one.
Its even documented to return nil on illegal strings. Fixed in SVN, added testcase.