diff options
| -rw-r--r-- | Zend/zend_operators.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 2345e0b2d4..f2378d84b6 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -492,7 +492,16 @@ try_again: ZEND_API void ZEND_FASTCALL _convert_to_cstring(zval *op ZEND_FILE_LINE_DC) /* {{{ */ { - _convert_to_string(op ZEND_FILE_LINE_CC); + double dval; + if (Z_TYPE_P(op) == IS_DOUBLE) { + zend_string *str; + double dval = Z_DVAL_P(op); + + str = zend_strpprintf(0, "%.*H", (int) EG(precision), dval); + ZVAL_NEW_STR(op, str); + } else { + _convert_to_string(op ZEND_FILE_LINE_CC); + } } /* }}} */ |
