summaryrefslogtreecommitdiff
path: root/php/src
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2016-12-09 11:28:11 +0100
committerBenoit Foucher <benoit@zeroc.com>2016-12-09 11:28:11 +0100
commit4ee4b62ea9f673809077d4269215fd3bf5ef5194 (patch)
tree65ff1d4ee341141e644e120c41e9f8133856d0e9 /php/src
parentiOS controller fixes (diff)
parentFixed ICE-7463 - icehashpassword now uses hash method instead of encrypt when... (diff)
downloadice-4ee4b62ea9f673809077d4269215fd3bf5ef5194.tar.bz2
ice-4ee4b62ea9f673809077d4269215fd3bf5ef5194.tar.xz
ice-4ee4b62ea9f673809077d4269215fd3bf5ef5194.zip
Merge remote-tracking branch 'origin/3.6'
Diffstat (limited to 'php/src')
-rw-r--r--php/src/php7/Types.cpp21
1 files changed, 1 insertions, 20 deletions
diff --git a/php/src/php7/Types.cpp b/php/src/php7/Types.cpp
index d99b04344d4..ce454528f80 100644
--- a/php/src/php7/Types.cpp
+++ b/php/src/php7/Types.cpp
@@ -1145,26 +1145,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