summaryrefslogtreecommitdiff
path: root/php/src/IcePHP/Communicator.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2012-10-12 15:31:48 -0700
committerMark Spruiell <mes@zeroc.com>2012-10-12 15:31:48 -0700
commited09446f6ab09a14abbbf3080bfa5986927a070d (patch)
tree4b3735e7b7b1c2ffe8056f7b9be7adbeb4d50f16 /php/src/IcePHP/Communicator.cpp
parentWinRT port updates (diff)
downloadice-ed09446f6ab09a14abbbf3080bfa5986927a070d.tar.bz2
ice-ed09446f6ab09a14abbbf3080bfa5986927a070d.tar.xz
ice-ed09446f6ab09a14abbbf3080bfa5986927a070d.zip
PHP optionals
Diffstat (limited to 'php/src/IcePHP/Communicator.cpp')
-rw-r--r--php/src/IcePHP/Communicator.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/php/src/IcePHP/Communicator.cpp b/php/src/IcePHP/Communicator.cpp
index 57e766eab31..d03801ade74 100644
--- a/php/src/IcePHP/Communicator.cpp
+++ b/php/src/IcePHP/Communicator.cpp
@@ -1592,7 +1592,20 @@ IcePHP::ObjectFactoryI::create(const string& id)
//
// Get the type information.
//
- ClassInfoPtr cls = getClassInfoById(id TSRMLS_CC);
+ ClassInfoPtr cls;
+ if(id == Ice::Object::ice_staticId())
+ {
+ //
+ // When the ID is that of Ice::Object, it indicates that the stream has not
+ // found a factory and is providing us an opportunity to preserve the object.
+ //
+ cls = getClassInfoById("::Ice::UnknownSlicedObject" TSRMLS_CC);
+ }
+ else
+ {
+ cls = getClassInfoById(id TSRMLS_CC);
+ }
+
if(!cls)
{
return 0;
@@ -1652,7 +1665,7 @@ IcePHP::ObjectFactoryI::create(const string& id)
MAKE_STD_ZVAL(obj);
AutoDestroy destroy(obj);
- if(object_init_ex(obj, cls->zce) != SUCCESS)
+ if(object_init_ex(obj, const_cast<zend_class_entry*>(cls->zce)) != SUCCESS)
{
throw AbortMarshaling();
}