THRIFT-867. php: PHP accelerator module's output transport is incompatible with TFramedTransport

This patch prevents TFramedTransport from flushing empty frames.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1076918 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/php/src/transport/TFramedTransport.php b/lib/php/src/transport/TFramedTransport.php
index dc57392..b1c0bb5 100644
--- a/lib/php/src/transport/TFramedTransport.php
+++ b/lib/php/src/transport/TFramedTransport.php
@@ -161,7 +161,7 @@
    * followed by the actual data.
    */
   public function flush() {
-    if (!$this->write_) {
+    if (!$this->write_ || strlen($this->wBuf_) == 0) {
       return $this->transport_->flush();
     }