[thrift] Move readMessageEnd inside of else block for accelerated protocol
Summary: Otherwise, readMessageEnd will be performed twice; once in the extension and once in PHP-land. Since TBinaryProtocol readMessageEnd is a no-op this isn't a huge deal, but it's bad style.
Reviewed By: mcslee
Test Plan: Inspect generated php code
Revert: OK
TracCamp Project: Thrift
DiffCamp Revision: 9155
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665567 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/src/generate/t_php_generator.cc b/compiler/cpp/src/generate/t_php_generator.cc
index 0d2e31f..99b207f 100644
--- a/compiler/cpp/src/generate/t_php_generator.cc
+++ b/compiler/cpp/src/generate/t_php_generator.cc
@@ -1287,14 +1287,13 @@
indent() << "$result = new " << resultname << "();" << endl <<
indent() << "$result->read($this->input_);" << endl;
- scope_down(out);
-
if (!binary_inline_) {
out <<
- indent() << "$this->input_->readMessageEnd();" << endl <<
- endl;
+ indent() << "$this->input_->readMessageEnd();" << endl;
}
+ scope_down(out);
+
// Careful, only return result if not a void function
if (!(*f_iter)->get_returntype()->is_void()) {
out <<