INIT_PZVAL(&arg2);
ZVAL_LONG(&arg2, flags);
- zend_call_method_with_2_params(&zobj, Z_OBJCE_P(zobj),
+ zend_call_method_with_2_params(&zobj, Z_OBJCE_P(zobj),
&spl_ce_RecursiveDirectoryIterator->constructor, "__construct", NULL, &arg1, &arg2);
if (!phar_data->is_persistent) {
if (zend_parse_parameters_none() == FAILURE) {
return;
}
-
+
array_init(return_value);
add_next_index_stringl(return_value, "MD5", 3, 1);
if (zend_parse_parameters_none() == FAILURE) {
return;
}
-
+
array_init(return_value);
phar_request_initialize(TSRMLS_C);
}
return ZEND_HASH_APPLY_STOP;
}
-
+
base = temp;
base_len = strlen(base);
/* {{{ proto array Phar::buildFromDirectory(string base_dir[, string regex])
* Construct a phar archive from an existing directory, recursively.
* Optional second parameter is a regular expression for filtering directory contents.
- *
+ *
* Return value is an array mapping phar index to actual files added.
*/
PHP_METHOD(Phar, buildFromDirectory)
ZVAL_LONG(&arg2, SPL_FILE_DIR_SKIPDOTS|SPL_FILE_DIR_UNIXPATHS);
#endif
- zend_call_method_with_2_params(&iter, spl_ce_RecursiveDirectoryIterator,
+ zend_call_method_with_2_params(&iter, spl_ce_RecursiveDirectoryIterator,
&spl_ce_RecursiveDirectoryIterator->constructor, "__construct", NULL, &arg, &arg2);
if (EG(exception)) {
RETURN_FALSE;
}
- zend_call_method_with_1_params(&iteriter, spl_ce_RecursiveIteratorIterator,
+ zend_call_method_with_1_params(&iteriter, spl_ce_RecursiveIteratorIterator,
&spl_ce_RecursiveIteratorIterator->constructor, "__construct", NULL, iter);
if (EG(exception)) {
INIT_PZVAL(&arg2);
ZVAL_STRINGL(&arg2, regex, regex_len, 0);
- zend_call_method_with_2_params(®exiter, spl_ce_RegexIterator,
+ zend_call_method_with_2_params(®exiter, spl_ce_RegexIterator,
&spl_ce_RegexIterator->constructor, "__construct", NULL, iteriter, &arg2);
}
PHP_METHOD(Phar, count)
{
PHAR_ARCHIVE_OBJECT();
-
+
if (zend_parse_parameters_none() == FAILURE) {
return;
}
spprintf(&newname, 0, "%s.%s", strtok(basename, "."), ext);
efree(basename);
-
+
basepath = estrndup(oldpath, (strlen(oldpath) - oldname_len));
phar->fname_len = spprintf(&newpath, 0, "%s%s", basepath, newname);
zend_hash_destroy(&(phar->manifest));
zend_hash_destroy(&(phar->mounted_dirs));
zend_hash_destroy(&(phar->virtual_dirs));
- php_stream_close(phar->fp);
+ if (phar->fp) {
+ php_stream_close(phar->fp);
+ }
efree(phar->fname);
efree(phar);
return NULL;
PHP_METHOD(Phar, isCompressed)
{
PHAR_ARCHIVE_OBJECT();
-
+
if (zend_parse_parameters_none() == FAILURE) {
return;
}
{
php_stream_statbuf ssb;
PHAR_ARCHIVE_OBJECT();
-
+
if (zend_parse_parameters_none() == FAILURE) {
return;
}
PHP_METHOD(Phar, getAlias)
{
PHAR_ARCHIVE_OBJECT();
-
+
if (zend_parse_parameters_none() == FAILURE) {
return;
}
PHP_METHOD(Phar, getPath)
{
PHAR_ARCHIVE_OBJECT();
-
+
if (zend_parse_parameters_none() == FAILURE) {
return;
}
PHP_METHOD(Phar, getVersion)
{
PHAR_ARCHIVE_OBJECT();
-
+
if (zend_parse_parameters_none() == FAILURE) {
return;
}
PHP_METHOD(Phar, startBuffering)
{
PHAR_ARCHIVE_OBJECT();
-
+
if (zend_parse_parameters_none() == FAILURE) {
return;
}
PHP_METHOD(Phar, isBuffering)
{
PHAR_ARCHIVE_OBJECT();
-
+
if (zend_parse_parameters_none() == FAILURE) {
return;
}
char *error;
PHAR_ARCHIVE_OBJECT();
-
+
if (zend_parse_parameters_none() == FAILURE) {
return;
}
PHP_METHOD(Phar, getSignature)
{
PHAR_ARCHIVE_OBJECT();
-
+
if (zend_parse_parameters_none() == FAILURE) {
return;
}
PHP_METHOD(Phar, getModified)
{
PHAR_ARCHIVE_OBJECT();
-
+
if (zend_parse_parameters_none() == FAILURE) {
return;
}
{
char *error;
PHAR_ARCHIVE_OBJECT();
-
+
if (zend_parse_parameters_none() == FAILURE) {
return;
}
phar_entry_info *stub;
PHAR_ARCHIVE_OBJECT();
-
+
if (zend_parse_parameters_none() == FAILURE) {
return;
}
PHP_METHOD(Phar, getMetadata)
{
PHAR_ARCHIVE_OBJECT();
-
+
if (zend_parse_parameters_none() == FAILURE) {
return;
}
INIT_PZVAL(&arg1);
ZVAL_STRINGL(&arg1, fname, fname_len, 0);
- zend_call_method_with_1_params(&zobj, Z_OBJCE_P(zobj),
+ zend_call_method_with_1_params(&zobj, Z_OBJCE_P(zobj),
&spl_ce_SplFileInfo->constructor, "__construct", NULL, &arg1);
}
/* }}} */
PHP_METHOD(PharFileInfo, getCompressedSize)
{
PHAR_ENTRY_OBJECT();
-
+
if (zend_parse_parameters_none() == FAILURE) {
return;
}
PHP_METHOD(PharFileInfo, getCRC32)
{
PHAR_ENTRY_OBJECT();
-
+
if (zend_parse_parameters_none() == FAILURE) {
return;
}
PHP_METHOD(PharFileInfo, isCRCChecked)
{
PHAR_ENTRY_OBJECT();
-
+
if (zend_parse_parameters_none() == FAILURE) {
return;
}
PHP_METHOD(PharFileInfo, getPharFlags)
{
PHAR_ENTRY_OBJECT();
-
+
if (zend_parse_parameters_none() == FAILURE) {
return;
}
PHP_METHOD(PharFileInfo, hasMetadata)
{
PHAR_ENTRY_OBJECT();
-
+
if (zend_parse_parameters_none() == FAILURE) {
return;
}
PHP_METHOD(PharFileInfo, getMetadata)
{
PHAR_ENTRY_OBJECT();
-
+
if (zend_parse_parameters_none() == FAILURE) {
return;
}
char *error;
PHAR_ENTRY_OBJECT();
-
+
if (zend_parse_parameters_none() == FAILURE) {
return;
}
phar_entry_info *link;
PHAR_ENTRY_OBJECT();
-
+
if (zend_parse_parameters_none() == FAILURE) {
return;
}
{
char *error;
PHAR_ENTRY_OBJECT();
-
+
if (zend_parse_parameters_none() == FAILURE) {
return;
}