summaryrefslogtreecommitdiff
path: root/Zend/zend_variables.c
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>1999-12-29 17:29:26 +0000
committerZeev Suraski <zeev@php.net>1999-12-29 17:29:26 +0000
commit80e20b5fea56a56911737c1adf9ec647cf2cfc82 (patch)
treea6bf188cf65d2cc3d8f34003834c73ffcf47ddac /Zend/zend_variables.c
parent8f88443abacfbfde78c6b6d2deb65c398e76a900 (diff)
downloadphp-git-80e20b5fea56a56911737c1adf9ec647cf2cfc82.tar.gz
- 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.
Diffstat (limited to 'Zend/zend_variables.c')
-rw-r--r--Zend/zend_variables.c5
1 files changed, 5 insertions, 0 deletions
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)