Thrift: fix error with handling TApplicationException
Summary:
The php recv functions for method invocations didn't pass a proper input object into the handler for reading an application exception. This caused graceful thrift failures to not work gracefully in PHP.
Reviewed By: Slee
Test Plan: Tested by invoking from a thrift client a function not defined on a thrift server. Should response with Invalid method name
Revert Plan: revertible
Notes:
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665061 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 36dd8d9..d5689c6 100644
--- a/compiler/cpp/src/generate/t_php_generator.cc
+++ b/compiler/cpp/src/generate/t_php_generator.cc
@@ -1063,8 +1063,8 @@
indent() << "$this->input_->readMessageBegin($fname, $mtype, $rseqid);" << endl <<
indent() << "if ($mtype == TMessageType::EXCEPTION) {" << endl <<
indent() << " $x = new TApplicationException();" << endl <<
- indent() << " $x->read($input);" << endl <<
- indent() << " $input->readMessageEnd();" << endl <<
+ indent() << " $x->read($this->input_);" << endl <<
+ indent() << " $this->input_->readMessageEnd();" << endl <<
indent() << " throw $x;" << endl <<
indent() << "}" << endl;
}