summaryrefslogtreecommitdiff
path: root/ext/dom/php_dom.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dom/php_dom.c')
-rw-r--r--ext/dom/php_dom.c17
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);