From 80e20b5fea56a56911737c1adf9ec647cf2cfc82 Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Wed, 29 Dec 1999 17:29:26 +0000 Subject: [PATCH] - 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. --- Zend/zend_variables.c | 5 +++++ 1 file changed, 5 insertions(+) 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) -- 2.40.0