Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions ext/phar/dirstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ php_stream *phar_wrapper_open_dir(php_stream_wrapper *wrapper, const char *path,

phar_request_initialize();

if (FAILURE == phar_get_archive(&phar, ZSTR_VAL(resource->host), ZSTR_LEN(resource->host), NULL, 0, &error)) {
if (FAILURE == phar_get_archive(&phar, ZSTR_VAL(resource->host), ZSTR_LEN(resource->host), NULL, &error)) {
if (error) {
php_stream_wrapper_log_error(wrapper, options, "%s", error);
efree(error);
Expand Down Expand Up @@ -355,7 +355,7 @@ int phar_wrapper_mkdir(php_stream_wrapper *wrapper, const char *url_from, int mo
return 0;
}

if (FAILURE == phar_get_archive(&phar, ZSTR_VAL(arch), ZSTR_LEN(arch), NULL, 0, NULL)) {
if (FAILURE == phar_get_archive(&phar, ZSTR_VAL(arch), ZSTR_LEN(arch), NULL, NULL)) {
phar = NULL;
}

Expand Down Expand Up @@ -383,7 +383,7 @@ int phar_wrapper_mkdir(php_stream_wrapper *wrapper, const char *url_from, int mo
return 0;
}

if (FAILURE == phar_get_archive(&phar, ZSTR_VAL(resource->host), ZSTR_LEN(resource->host), NULL, 0, &error)) {
if (FAILURE == phar_get_archive(&phar, ZSTR_VAL(resource->host), ZSTR_LEN(resource->host), NULL, &error)) {
php_stream_wrapper_log_error(wrapper, options, "phar error: cannot create directory \"%s\" in phar \"%s\", error retrieving phar information: %s", ZSTR_VAL(resource->path) + 1, ZSTR_VAL(resource->host), error);
efree(error);
php_url_free(resource);
Expand Down Expand Up @@ -481,7 +481,7 @@ int phar_wrapper_rmdir(php_stream_wrapper *wrapper, const char *url, int options
return 0;
}

if (FAILURE == phar_get_archive(&phar, ZSTR_VAL(arch), ZSTR_LEN(arch), NULL, 0, NULL)) {
if (FAILURE == phar_get_archive(&phar, ZSTR_VAL(arch), ZSTR_LEN(arch), NULL, NULL)) {
phar = NULL;
}

Expand Down Expand Up @@ -509,7 +509,7 @@ int phar_wrapper_rmdir(php_stream_wrapper *wrapper, const char *url, int options
return 0;
}

if (FAILURE == phar_get_archive(&phar, ZSTR_VAL(resource->host), ZSTR_LEN(resource->host), NULL, 0, &error)) {
if (FAILURE == phar_get_archive(&phar, ZSTR_VAL(resource->host), ZSTR_LEN(resource->host), NULL, &error)) {
php_stream_wrapper_log_error(wrapper, options, "phar error: cannot remove directory \"%s\" in phar \"%s\", error retrieving phar information: %s", ZSTR_VAL(resource->path)+1, ZSTR_VAL(resource->host), error);
efree(error);
php_url_free(resource);
Expand Down
8 changes: 4 additions & 4 deletions ext/phar/func_interceptors.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static zend_string* phar_get_name_for_relative_paths(zend_string *filename, bool
/* fopen within phar, if :// is not in the url, then prepend phar://<archive>/ */
/* retrieving a file defaults to within the current directory, so use this if possible */
phar_archive_data *phar;
if (FAILURE == phar_get_archive(&phar, ZSTR_VAL(arch), ZSTR_LEN(arch), NULL, 0, NULL)) {
if (FAILURE == phar_get_archive(&phar, ZSTR_VAL(arch), ZSTR_LEN(arch), NULL, NULL)) {
zend_string_release_ex(arch, false);
return NULL;
}
Expand Down Expand Up @@ -494,7 +494,7 @@ static void phar_file_stat(const char *filename, size_t filename_length, int typ
zend_string *arch = phar_split_fname(ZSTR_VAL(fname), ZSTR_LEN(fname), NULL, 2, 0);
if (arch) {
/* fopen within phar, if :// is not in the url, then prepend phar://<archive>/ */
zend_result has_archive = phar_get_archive(&phar, ZSTR_VAL(arch), ZSTR_LEN(arch), NULL, 0, NULL);
zend_result has_archive = phar_get_archive(&phar, ZSTR_VAL(arch), ZSTR_LEN(arch), NULL, NULL);
zend_string_release_ex(arch, false);
if (FAILURE == has_archive) {
goto skip_phar;
Expand Down Expand Up @@ -733,7 +733,7 @@ PHP_FUNCTION(phar_is_file) /* {{{ */

/* fopen within phar, if :// is not in the url, then prepend phar://<archive>/ */
/* retrieving a file within the current directory, so use this if possible */
zend_result has_archive = phar_get_archive(&phar, ZSTR_VAL(arch), ZSTR_LEN(arch), NULL, 0, NULL);
zend_result has_archive = phar_get_archive(&phar, ZSTR_VAL(arch), ZSTR_LEN(arch), NULL, NULL);
zend_string_release_ex(arch, false);
if (has_archive == SUCCESS) {
phar_entry_info *etemp;
Expand Down Expand Up @@ -790,7 +790,7 @@ PHP_FUNCTION(phar_is_link) /* {{{ */

/* fopen within phar, if :// is not in the url, then prepend phar://<archive>/ */
/* retrieving a file within the current directory, so use this if possible */
zend_result has_archive = phar_get_archive(&phar, ZSTR_VAL(arch), ZSTR_LEN(arch), NULL, 0, NULL);
zend_result has_archive = phar_get_archive(&phar, ZSTR_VAL(arch), ZSTR_LEN(arch), NULL, NULL);
zend_string_release_ex(arch, false);
if (has_archive == SUCCESS) {
phar_entry_info *etemp;
Expand Down
Loading
Loading