Browse Source

Fixed bug with oneofs in JSON decoding.

Joshua Haberman 5 years ago
parent
commit
4936abe813
1 changed files with 1 additions and 1 deletions
  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;
   }
 
-  if (upb_fielddef_containingoneof(f) &&
+  if (upb_fielddef_realcontainingoneof(f) &&
       upb_msg_whichoneof(msg, upb_fielddef_containingoneof(f))) {
     jsondec_err(d, "More than one field for this oneof.");
   }