From b154e82d24c36d06d8bcdd2581b020e41c203472 Mon Sep 17 00:00:00 2001 From: foobar Date: Fri, 15 Apr 2005 22:46:37 +0000 Subject: [PATCH] - Fixed bug #32719 (strval() fails to zero terminate strings) --- ext/standard/type.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/standard/type.c b/ext/standard/type.c index eeff11bc296..2687f8c0838 100644 --- a/ext/standard/type.c +++ b/ext/standard/type.c @@ -177,7 +177,7 @@ PHP_FUNCTION(floatval) Get the string value of a variable */ PHP_FUNCTION(strval) { - pval **num, *tmp; + zval **num, *tmp; zval expr_copy; int use_copy; @@ -190,7 +190,7 @@ PHP_FUNCTION(strval) tmp = &expr_copy; RETVAL_ZVAL(tmp, 0, 0); } else { - RETVAL_ZVAL(*num, 0, 0); + RETVAL_ZVAL(*num, 1, 0); } } /* }}} */