- Fixed bug #32719 (strval() fails to zero terminate strings)

This commit is contained in:
foobar 2005-04-15 22:46:37 +00:00
parent e5697cc0ad
commit b154e82d24

View file

@ -177,7 +177,7 @@ PHP_FUNCTION(floatval)
Get the string value of a variable */ Get the string value of a variable */
PHP_FUNCTION(strval) PHP_FUNCTION(strval)
{ {
pval **num, *tmp; zval **num, *tmp;
zval expr_copy; zval expr_copy;
int use_copy; int use_copy;
@ -190,7 +190,7 @@ PHP_FUNCTION(strval)
tmp = &expr_copy; tmp = &expr_copy;
RETVAL_ZVAL(tmp, 0, 0); RETVAL_ZVAL(tmp, 0, 0);
} else { } else {
RETVAL_ZVAL(*num, 0, 0); RETVAL_ZVAL(*num, 1, 0);
} }
} }
/* }}} */ /* }}} */