From aaf84cb10f3da539943bc44267ffd17b8058ce7e Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Mon, 29 Jun 2020 10:31:20 -0700 Subject: [PATCH] Bugfix for when message constructor has no argument. (#7660) This fixes the user issue: https://github.com/protocolbuffers/protobuf/issues/7611#issuecomment-647025031 --- php/ext/google/protobuf2/message.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/ext/google/protobuf2/message.c b/php/ext/google/protobuf2/message.c index 6c28dee000..20dd37a76e 100644 --- a/php/ext/google/protobuf2/message.c +++ b/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);