Skip to content
Permalink
Browse files

ICE-7462 - Add PHP 7.1 support

  • Loading branch information
externl committed Dec 8, 2016
1 parent f6c3c67 commit 39bc1eb7030758cb057b2f8ff2006d42d849c112
Showing with 1 addition and 20 deletions.
  1. +1 −20 php/src/php7/Types.cpp
@@ -1166,26 +1166,7 @@ IcePHP::DataMember::setMember(zval* target, zval* zv)
{
assert(Z_TYPE_P(target) == IS_OBJECT);

//
// The add_property_zval function fails if the data member has protected visibility.
// As a workaround, before calling the function we change the current scope to be that
// of the object.
//
zend_class_entry *oldScope = EG(scope);
EG(scope) = Z_OBJCE_P(target);

//
// add_property_zval increments the refcount of zv.
//
int status = add_property_zval(target, STRCAST(name.c_str()), zv);

EG(scope) = oldScope; // Restore the previous scope.

if(status == FAILURE)
{
runtimeError("unable to set member `%s'", name.c_str());
throw AbortMarshaling();
}
zend_update_property(Z_OBJCE_P(target), target, STRCAST(name.c_str()), strlen(name.c_str()), zv);
}

static void

0 comments on commit 39bc1eb

Please sign in to comment.
You can’t perform that action at this time.