Skip to content

Commit

Permalink
Merge pull request #8276 from haberman/php-warning
Browse files Browse the repository at this point in the history
Added more information to "file already loaded" warning.
  • Loading branch information
haberman committed Feb 11, 2021
2 parents 44cd75d + db66c95 commit a97c4f4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion php/ext/google/protobuf/def.c
Expand Up @@ -916,7 +916,10 @@ static void add_descriptor(DescriptorPool *pool,

if (upb_symtab_lookupfile2(pool->symtab, name.data, name.size)) {
// Already added.
fprintf(stderr, "WARNING: file was already added\n");
zend_error(E_USER_WARNING,
"proto descriptor was previously loaded (included in multiple "
"metadata bundles?): " UPB_STRVIEW_FORMAT,
UPB_STRVIEW_ARGS(name));
return;
}

Expand Down

0 comments on commit a97c4f4

Please sign in to comment.