diff --git a/v8js_class.cc b/v8js_class.cc index c25957b..0047e25 100644 --- a/v8js_class.cc +++ b/v8js_class.cc @@ -440,7 +440,9 @@ static PHP_METHOD(V8Js, __construct) } zend_property_info *property_info = zend_get_property_info(c->std.ce, member, 1 TSRMLS_CC); - if(property_info && property_info->flags & ZEND_ACC_PUBLIC) { + if(property_info && + property_info != ZEND_WRONG_PROPERTY_INFO && + property_info->flags & ZEND_ACC_PUBLIC) { /* Write value to PHP JS object */ php_obj->ForceSet(V8JS_SYML(ZSTR_VAL(member), ZSTR_LEN(member) - 1), zval_to_v8js(value, isolate TSRMLS_CC), v8::ReadOnly); } @@ -995,7 +997,9 @@ static void v8js_write_property(zval *object, zval *member, zval *value, void ** /* Check whether member is public, if so, export to V8. */ zend_property_info *property_info = zend_get_property_info(c->std.ce, Z_STR_P(member), 1 TSRMLS_CC); - if(!property_info || property_info->flags & ZEND_ACC_PUBLIC) { + if(!property_info || + (property_info != ZEND_WRONG_PROPERTY_INFO && + property_info->flags & ZEND_ACC_PUBLIC)) { /* Global PHP JS object */ v8::Local object_name_js = v8::Local::New(isolate, c->object_name); v8::Local jsobj = V8JS_GLOBAL(isolate)->Get(object_name_js)->ToObject(); diff --git a/v8js_object_export.cc b/v8js_object_export.cc index 68b554c..b27cd70 100644 --- a/v8js_object_export.cc +++ b/v8js_object_export.cc @@ -594,7 +594,9 @@ inline v8::Local v8js_named_property_callback(v8::Local p /* Nope, not a method -- must be a (case-sensitive) property */ zend_property_info *property_info = zend_get_property_info(ce, Z_STR(zname), 1 TSRMLS_CC); - if(property_info && property_info->flags & ZEND_ACC_PUBLIC) { + if(property_info && + property_info != ZEND_WRONG_PROPERTY_INFO && + property_info->flags & ZEND_ACC_PUBLIC) { zval *property_val = zend_read_property(NULL, &zobject, V8JS_CONST name, name_len, true, &php_value TSRMLS_CC); // special case uninitialized_zval_ptr and return an empty value // (indicating that we don't intercept this property) if the @@ -629,7 +631,9 @@ inline v8::Local v8js_named_property_callback(v8::Local p else { zend_property_info *property_info = zend_get_property_info(ce, Z_STR(zname), 1 TSRMLS_CC); - if(property_info && property_info->flags & ZEND_ACC_PUBLIC) { + if(property_info && + property_info != ZEND_WRONG_PROPERTY_INFO && + property_info->flags & ZEND_ACC_PUBLIC) { zend_update_property(scope, &zobject, V8JS_CONST name, name_len, &php_value TSRMLS_CC); ret_value = set_value; } @@ -660,7 +664,9 @@ inline v8::Local v8js_named_property_callback(v8::Local p } else { zend_property_info *property_info = zend_get_property_info(ce, Z_STR(zname), 1 TSRMLS_CC); - if(property_info && property_info->flags & ZEND_ACC_PUBLIC) { + if(property_info && + property_info != ZEND_WRONG_PROPERTY_INFO && + property_info->flags & ZEND_ACC_PUBLIC) { h->unset_property(&zobject, &zname, NULL TSRMLS_CC); ret_value = V8JS_TRUE(); }