summaryrefslogtreecommitdiff
path: root/ext/phar/phar_object.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/phar/phar_object.c')
-rw-r--r--ext/phar/phar_object.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c
index d73f6ad641..e8f9c4c481 100644
--- a/ext/phar/phar_object.c
+++ b/ext/phar/phar_object.c
@@ -712,15 +712,8 @@ PHP_METHOD(Phar, webPhar)
switch (Z_TYPE(retval)) {
case IS_STRING:
efree(entry);
-
- if (fci.retval != &retval) {
- entry = estrndup(Z_STRVAL_P(fci.retval), Z_STRLEN_P(fci.retval));
- entry_len = Z_STRLEN_P(fci.retval);
- } else {
- entry = Z_STRVAL(retval);
- entry_len = Z_STRLEN(retval);
- }
-
+ entry = estrndup(Z_STRVAL_P(fci.retval), Z_STRLEN_P(fci.retval));
+ entry_len = Z_STRLEN_P(fci.retval);
break;
case IS_TRUE:
case IS_FALSE:
@@ -3832,7 +3825,6 @@ PHP_METHOD(Phar, addFile)
php_stream_to_zval(resource, &zresource);
phar_add_file(&(phar_obj->archive), fname, fname_len, NULL, 0, &zresource TSRMLS_CC);
zval_ptr_dtor(&zresource);
- php_stream_close(resource);
}
/* }}} */