Bugfix for when message constructor has no argument. (#7660)

This fixes the user issue: https://github.com/protocolbuffers/protobuf/issues/7611#issuecomment-647025031
pull/7662/head
Joshua Haberman 5 years ago committed by GitHub
parent 2c1a46101b
commit aaf84cb10f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      php/ext/google/protobuf2/message.c

@ -366,7 +366,7 @@ PHP_METHOD(Message, __construct) {
const Descriptor* desc = Descriptor_GetFromClassEntry(Z_OBJCE_P(getThis()));
const upb_msgdef *msgdef = desc->msgdef;
upb_arena *arena = Arena_Get(&intern->arena);
zval *init_arr;
zval *init_arr = NULL;
intern->desc = desc;
intern->msg = upb_msg_new(msgdef, arena);

Loading…
Cancel
Save