mirror of
https://github.com/php/php-src.git
synced 2026-04-05 07:02:33 +02:00
Merge branch 'PHP-7.0'
* PHP-7.0: Restored the original (php-5) behavior of convert_to_cstring(). It was broken in php7 by mistake and caused problems in ext/pgsql/tests/bug46408.phpt.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user