}
} else {
zval *userz;
+ long tmp;
if (source->is_tar) {
phar_entry_info *entry;
/* copy the other phar's stub */
ALLOC_ZVAL(userz);
php_stream_to_zval(source->fp, userz);
- phar_flush(&phar, (char *) &userz, -(source->internal_file_start), &error TSRMLS_CC);
+ tmp = source->internal_file_start;
+ phar_flush(&phar, (char *) &userz, -tmp, &error TSRMLS_CC);
efree(userz);
if (source->is_tar) {
source->internal_file_start = 0;
if (phar.is_zip) {
_zip_free(phar.zip);
_zip_free(source->zip);
- if (FAILURE == php_copy_file(opened_path, source->fname)) {
+ if (FAILURE == php_copy_file(opened_path, source->fname TSRMLS_CC)) {
/* we can't throw an exception or bad crap will happen */
zend_error(E_ERROR, "Error: could not copy newly created zip to \"%s\", phar is in unstable state, shutting down", source->fname);
}
source->zip = zip_open(source->fname, 0, &ziperror);
if (!source->zip) {
- efree(opened_path);
/* now for the stupid hoops libzip forces... */
char *tmp;
int tmp_len;
+
+ efree(opened_path);
tmp_len = zip_error_to_str(NULL, 0, ziperror, ziperror);
if (!(tmp = emalloc((tmp_len + 1) * sizeof(char)))) {
zend_error(E_ERROR, "Error: could not re-open newly created zip \"%s\", phar is in unstable state, shutting down", source->fname);
efree(error);
return;
}
- phar_convert_to_other(phar_obj->arc.archive, 1);
+ phar_convert_to_other(phar_obj->arc.archive, 1 TSRMLS_CC);
+ RETURN_TRUE;
}
/* }}} */
efree(error);
return;
}
- phar_convert_to_other(phar_obj->arc.archive, 2);
+ phar_convert_to_other(phar_obj->arc.archive, 2 TSRMLS_CC);
+ RETURN_TRUE;
}
/* }}} */
return;
}
- phar_convert_to_other(phar_obj->arc.archive, 0);
+ phar_convert_to_other(phar_obj->arc.archive, 0 TSRMLS_CC);
RETURN_TRUE;
}
/* }}} */