From a7d6c3c142594b3ba2eb294c96b9ee3e48f20b75 Mon Sep 17 00:00:00 2001 From: Martin Kraemer Date: Fri, 16 Mar 2007 02:03:32 +0000 Subject: [PATCH] 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 --- compiler/cpp/src/generate/t_php_generator.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/cpp/src/generate/t_php_generator.cc b/compiler/cpp/src/generate/t_php_generator.cc index 36dd8d95..d5689c6d 100644 --- a/compiler/cpp/src/generate/t_php_generator.cc +++ b/compiler/cpp/src/generate/t_php_generator.cc @@ -1063,8 +1063,8 @@ void t_php_generator::generate_service_client(t_service* tservice) { 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; } -- 2.17.1