summaryrefslogtreecommitdiff
path: root/ext/phar/tar.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/phar/tar.c')
-rw-r--r--ext/phar/tar.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/ext/phar/tar.c b/ext/phar/tar.c
index 3b7373f6fa..e40739726b 100644
--- a/ext/phar/tar.c
+++ b/ext/phar/tar.c
@@ -498,14 +498,9 @@ bail:
entry.link = estrndup(hdr->linkname, linkname_len);
}
phar_set_inode(&entry);
- if ((newentry = zend_hash_str_add_mem(&myphar->manifest, entry.filename, entry.filename_len, (void*)&entry, sizeof(phar_entry_info))) == NULL) {
- if (error) {
- spprintf(error, 4096, "phar error: tar-based phar \"%s\" cannot be registered", entry.filename);
- }
- php_stream_close(fp);
- phar_destroy_phar_data(myphar);
- return FAILURE;
- }
+
+ newentry = zend_hash_str_update_mem(&myphar->manifest, entry.filename, entry.filename_len, (void*)&entry, sizeof(phar_entry_info));
+ ZEND_ASSERT(newentry != NULL);
if (entry.is_persistent) {
++entry.manifest_pos;