You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Stig Bakken (JIRA)" <ji...@apache.org> on 2014/08/20 09:24:26 UTC
[jira] [Commented] (THRIFT-2671) PHP validator should not be
applied to exceptions
[ https://issues.apache.org/jira/browse/THRIFT-2671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14103550#comment-14103550 ]
Stig Bakken commented on THRIFT-2671:
-------------------------------------
diff --git a/compiler/cpp/src/generate/t_php_generator.cc b/compiler/cpp/src/generate/t_php_generator.cc
index 2d8fe00..487acab 100644
--- a/compiler/cpp/src/generate/t_php_generator.cc
+++ b/compiler/cpp/src/generate/t_php_generator.cc
@@ -1141,6 +1141,7 @@ int t_php_generator::get_php_num_required_fields(const vector<t_field*>& fields,
bool t_php_generator::needs_php_write_validator(t_struct* tstruct) {
return (validate_ &&
!tstruct->is_union() &&
+ !tstruct->is_xception() &&
get_php_num_required_fields(tstruct->get_members(), true) > 0);
}
> PHP validator should not be applied to exceptions
> -------------------------------------------------
>
> Key: THRIFT-2671
> URL: https://issues.apache.org/jira/browse/THRIFT-2671
> Project: Thrift
> Issue Type: Bug
> Components: PHP - Compiler
> Affects Versions: 1.0
> Reporter: Stig Bakken
> Priority: Minor
>
> PHP validators are applied to exception fields, which they should never be. Patch attached.
--
This message was sent by Atlassian JIRA
(v6.2#6252)