0526e973c5
The simplifier would convert strictly-integer strings to their integer equivalent, and all other strings to zero. This meant that eg "1.1" became zero, as did "1x". Normally, such strings are converted at the ast level, so it was hard to expose the bug, but eg test/quick/cnvInt.php would fail if you turned off JitEnableRenameFunctions (and its turned off in repo mode, so the repo mode test was failing). The same issue was present in ConvStrToDbl, but there was a bug in StringData::isNumeric causing it to return true for a weakly-numeric string, where its contract is to return false (and it did return false for an equivalent, non-static string). Once I fixed that bug, I had to fix the bug in ConvStrToDbl.
24 linhas
321 B
Plaintext
24 linhas
321 B
Plaintext
int(0)
|
|
int(1)
|
|
int(1)
|
|
int(9007199254740992)
|
|
int(1)
|
|
int(0)
|
|
int(1)
|
|
HipHop Notice: Object of class C could not be converted to int in %s on line 4
|
|
int(1)
|
|
int(0)
|
|
int(0)
|
|
int(1)
|
|
int(0)
|
|
int(1)
|
|
int(0)
|
|
int(1)
|
|
int(0)
|
|
HipHop Notice: Object of class C could not be converted to int in %s on line 50
|
|
int(1)
|
|
int(0)
|
|
int(1)
|
|
int(5)
|
|
int(7)
|