Skip to content

Commit a97c4f4

Browse files
authored
Merge pull request #8276 from haberman/php-warning
Added more information to "file already loaded" warning.
2 parents 44cd75d + db66c95 commit a97c4f4

File tree

1 file changed

+4
-1
lines changed
  • php/ext/google/protobuf

1 file changed

+4
-1
lines changed

php/ext/google/protobuf/def.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,10 @@ static void add_descriptor(DescriptorPool *pool,
916916

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

0 commit comments

Comments
 (0)