From: Zeev Suraski Date: Wed, 29 Dec 1999 17:29:26 +0000 (+0000) Subject: - Change var_reset() to set bool(0) instead of string("") X-Git-Tag: PRE_ISSET_TYPE~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=80e20b5fea56a56911737c1adf9ec647cf2cfc82;p=php - Change var_reset() to set bool(0) instead of string("") Authors should go over their code and change it to use var_reset() instead of manually setting it to string(""), in case they're interested in the false value. --- diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c index c0fee24ee6..f2cb9a1388 100644 --- a/Zend/zend_variables.c +++ b/Zend/zend_variables.c @@ -38,9 +38,14 @@ ZEND_API char *undefined_variable_string = "\0"; /* and empty strings must be evaluated as FALSE */ ZEND_API inline void var_reset(zval *var) { +#if 0 var->type = IS_STRING; var->value.str.val = empty_string; var->value.str.len = 0; +#else + var->type = IS_BOOL; + var->value.lval = 0; +#endif } ZEND_API inline void var_uninit(zval *var)