Thrift-1240: TBinarySerializer.php invalid serialization due to TBufferTransport...
authorJake Farrell <jfarrell@apache.org>
Fri, 26 Aug 2011 02:42:14 +0000 (02:42 +0000)
committerJake Farrell <jfarrell@apache.org>
Fri, 26 Aug 2011 02:42:14 +0000 (02:42 +0000)
Client: php
Patch: Marimuthu Ponnambalam

Simple Serialization errors out, due to the TBufferTransport not flushing the data into TMemoryBuffer after $object->write($protocol) in TBinarySerializer.

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1161968 13f79535-47bb-0310-9956-ffa450edef68

lib/php/src/protocol/TBinarySerializer.php

index 2913d32..542233b 100644 (file)
@@ -48,6 +48,7 @@ class TBinarySerializer {
     } else {
       $object->write($protocol);
     }
+    $protocol->getTransport()->flush();
     return $transport->getBuffer();
   }