浏览代码

Fixed bug with oneofs in JSON decoding.

Joshua Haberman 5 年之前
父节点
当前提交
4936abe813
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      php/ext/google/protobuf/php-upb.c

+ 1 - 1
php/ext/google/protobuf/php-upb.c

@@ -6794,7 +6794,7 @@ static void jsondec_field(jsondec *d, upb_msg *msg, const upb_msgdef *m) {
     return;
     return;
   }
   }
 
 
-  if (upb_fielddef_containingoneof(f) &&
+  if (upb_fielddef_realcontainingoneof(f) &&
       upb_msg_whichoneof(msg, upb_fielddef_containingoneof(f))) {
       upb_msg_whichoneof(msg, upb_fielddef_containingoneof(f))) {
     jsondec_err(d, "More than one field for this oneof.");
     jsondec_err(d, "More than one field for this oneof.");
   }
   }