diff options
-rw-r--r-- | Zend/zend_operators.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index e87c4dc6e0..3432621cde 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -1362,8 +1362,8 @@ ZEND_API inline int is_numeric_string(char *str, int length, long *lval, double errno=0; local_dval = strtod(str, &end_ptr); if (errno!=ERANGE && end_ptr == str+length) { /* floating point string */ - if (local_dval==HUGE_VAL || local_dval==-HUGE_VAL) { - /* "inf" */ + if (! finite(local_dval)) { + /* "inf","nan" and maybe other weird ones */ return 0; } |