Fixes test #50

This commit is contained in:
Ilia Alshanetsky 2006-12-30 01:56:18 +00:00
parent 79d524dc1e
commit 790b0b9edf

View File

@ -382,6 +382,9 @@ void php_filter_float(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
Z_DVAL_P(value) = lval; Z_DVAL_P(value) = lval;
break; break;
case IS_DOUBLE: case IS_DOUBLE:
if ((!dval && p - num > 1 && strpbrk(num, "123456789")) || !zend_finite(dval)) {
goto error;
}
zval_dtor(value); zval_dtor(value);
Z_TYPE_P(value) = IS_DOUBLE; Z_TYPE_P(value) = IS_DOUBLE;
Z_DVAL_P(value) = dval; Z_DVAL_P(value) = dval;