]> granicus.if.org Git - php/commitdiff
Ensure lval to have a *boolean* value.
authorMoriyoshi Koizumi <moriyoshi@php.net>
Fri, 3 Oct 2003 16:57:41 +0000 (16:57 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Fri, 3 Oct 2003 16:57:41 +0000 (16:57 +0000)
Zend/zend_API.h

index c68c2814c73412950a34e57a308c803be5562f70..ff108c8d1474c1c3a4dae2f04464cb2144638637 100644 (file)
@@ -332,7 +332,7 @@ ZEND_API ZEND_FUNCTION(display_disabled_class);
 
 #define ZVAL_BOOL(z, b) {                              \
                (z)->type = IS_BOOL;            \
-               (z)->value.lval = b;            \
+               (z)->value.lval = (b != 0);     \
        }
 
 #define ZVAL_NULL(z) {                                 \