mirror of
https://github.com/php-gnupg/php-gnupg.git
synced 2024-12-23 10:21:39 +00:00
Fix CS in gnupg_import
This commit is contained in:
parent
f20f7081cb
commit
67ec0b2be5
1 changed files with 6 additions and 4 deletions
10
gnupg.c
10
gnupg.c
|
@ -1594,20 +1594,22 @@ PHP_FUNCTION(gnupg_import)
|
|||
GNUPG_GETOBJ();
|
||||
|
||||
if (this) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &importkey, &importkey_len) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s",
|
||||
&importkey, &importkey_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs", &res, &importkey, &importkey_len) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs",
|
||||
&res, &importkey, &importkey_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
GNUPG_RES_FETCH();
|
||||
}
|
||||
if ((PHPC_THIS->err = gpgme_data_new_from_mem(&in, importkey, importkey_len, 0)) != GPG_ERR_NO_ERROR) {
|
||||
if (!PHP_GNUPG_DO(gpgme_data_new_from_mem(&in, importkey, importkey_len, 0))) {
|
||||
GNUPG_ERR("could not create in-data buffer");
|
||||
return;
|
||||
}
|
||||
if ((PHPC_THIS->err = gpgme_op_import(PHPC_THIS->ctx,in)) != GPG_ERR_NO_ERROR) {
|
||||
if (!PHP_GNUPG_DO(gpgme_op_import(PHPC_THIS->ctx,in))) {
|
||||
GNUPG_ERR("import failed");
|
||||
gpgme_data_release(in);
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue