diff options
author | Jose <jose@zeroc.com> | 2018-07-27 22:02:00 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2018-07-27 22:02:00 +0200 |
commit | d4b1ed9bbcceb1885958f3fb68639bea03ae5d4d (patch) | |
tree | 5782c6543c9245f8cdf31d35ec4c64905c0cdc19 /php/src | |
parent | Remove workaround for old Visual Studio versions (diff) | |
download | ice-d4b1ed9bbcceb1885958f3fb68639bea03ae5d4d.tar.bz2 ice-d4b1ed9bbcceb1885958f3fb68639bea03ae5d4d.tar.xz ice-d4b1ed9bbcceb1885958f3fb68639bea03ae5d4d.zip |
Fix IcePHP sequences order
Close #172
Diffstat (limited to 'php/src')
-rw-r--r-- | php/src/php5/Types.cpp | 5 | ||||
-rw-r--r-- | php/src/php7/Types.cpp | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/php/src/php5/Types.cpp b/php/src/php5/Types.cpp index 92e1a659362..1702befe7a1 100644 --- a/php/src/php5/Types.cpp +++ b/php/src/php5/Types.cpp @@ -1681,6 +1681,11 @@ IcePHP::SequenceInfo::unmarshal(Ice::InputStream* is, const UnmarshalCallbackPtr Ice::Int sz = is->readSize(); for(Ice::Int i = 0; i < sz; ++i) { + // + // Add a temporary null value so that the foreach order is the + // same as the index order. + // + add_index_null(&zv, i); void* cl = reinterpret_cast<void*>(i); elementType->unmarshal(is, this, comm, zv, cl, false TSRMLS_CC); } diff --git a/php/src/php7/Types.cpp b/php/src/php7/Types.cpp index 3ee8dad405c..5ce0c6b6d19 100644 --- a/php/src/php7/Types.cpp +++ b/php/src/php7/Types.cpp @@ -1622,7 +1622,11 @@ IcePHP::SequenceInfo::unmarshal(Ice::InputStream* is, const UnmarshalCallbackPtr # pragma warning(default:4311) # pragma warning(default:4312) #endif - + // + // Add a temporary null value so that the foreach order is the + // same as the index order. + // + add_index_null(&zv, i); elementType->unmarshal(is, this, comm, &zv, cl, false); } |