Fixed bug with oneofs in JSON decoding.

pull/8006/head
Joshua Haberman 4 years ago
parent d140b1cdce
commit 4936abe813
  1. 2
      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.");
}

Loading…
Cancel
Save