diff options
author | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 00:38:07 -0400 |
---|---|---|
committer | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 00:38:07 -0400 |
commit | bb01389fbd53ec1cbcb80d0681a37cca1267891a (patch) | |
tree | 4783178fca65a5d9071c8df34f2ddc3d31728673 /ext/dom/php_dom.c | |
parent | eddbbea4325e602ddc87c545531609132d4f0e3b (diff) | |
download | php-bb01389fbd53ec1cbcb80d0681a37cca1267891a.tar.gz |
Imported Upstream version 5.2.4upstream/5.2.4
Diffstat (limited to 'ext/dom/php_dom.c')
-rw-r--r-- | ext/dom/php_dom.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index a82de197f..78e32988a 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_dom.c,v 1.73.2.12.2.10 2007/04/03 11:57:04 rrichards Exp $ */ +/* $Id: php_dom.c,v 1.73.2.12.2.11 2007/08/06 16:22:24 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -411,7 +411,20 @@ static int dom_property_exists(zval *object, zval *member, int check_empty TSRML ret = zend_hash_find((HashTable *)obj->prop_handler, Z_STRVAL_P(member), Z_STRLEN_P(member)+1, (void **) &hnd); } if (ret == SUCCESS) { - retval = 1; + zval *tmp; + + if (check_empty == 2) { + retval = 1; + } else if (hnd->read_func(obj, &tmp TSRMLS_CC) == SUCCESS) { + tmp->refcount = 1; + tmp->is_ref = 0; + if (check_empty == 1) { + retval = zend_is_true(tmp); + } else if (check_empty == 0) { + retval = (Z_TYPE_P(tmp) != IS_NULL); + } + zval_ptr_dtor(&tmp); + } } else { std_hnd = zend_get_std_object_handlers(); retval = std_hnd->has_property(object, member, check_empty TSRMLS_CC); |