Fixed the uninitialized ptr check. This makes all tests in Twig_TemplateTest pass!
authorDerick Rethans <github@derickrethans.nl>
Fri, 8 Jul 2011 12:01:22 +0000 (13:01 +0100)
committerDerick Rethans <github@derickrethans.nl>
Fri, 8 Jul 2011 12:01:22 +0000 (13:01 +0100)
twig.c

diff --git a/twig.c b/twig.c
index 59d2b18..b3185ca 100644 (file)
--- a/twig.c
+++ b/twig.c
@@ -329,7 +329,7 @@ zval *TWIG_PROPERTY(zval *object, zval *propname)
 
        if (Z_OBJ_HT_P(object)->read_property) {
                tmp = Z_OBJ_HT_P(object)->read_property(object, propname, BP_VAR_IS TSRMLS_CC);
-               if (&tmp != &EG(uninitialized_zval_ptr)) {
+               if (tmp != EG(uninitialized_zval_ptr)) {
                        return tmp;
                } else {
                        return NULL;