mirror of
https://github.com/php-gnupg/php-gnupg.git
synced 2026-02-05 05:41:34 +00:00
More cleanup based on patch from fedora at famillecollet dot com in bug #60915
This commit is contained in:
parent
71d97801e9
commit
7bba784b63
2 changed files with 9 additions and 7 deletions
|
|
@ -23,6 +23,7 @@
|
|||
#include "php_ini.h"
|
||||
#include "ext/standard/info.h"
|
||||
#include "zend_interfaces.h"
|
||||
#include "zend_exceptions.h"
|
||||
#include "php_gnupg.h"
|
||||
#include "php_gnupg_keylistiterator.h"
|
||||
|
||||
|
|
@ -148,7 +149,7 @@ PHP_METHOD(gnupg_keylistiterator,next){
|
|||
gpgme_key_release(intern->gpgkey);
|
||||
}
|
||||
|
||||
if(intern->err = gpgme_op_keylist_next(intern->ctx, &intern->gpgkey)){
|
||||
if((intern->err = gpgme_op_keylist_next(intern->ctx, &intern->gpgkey))){
|
||||
gpgme_key_release(intern->gpgkey);
|
||||
intern->gpgkey = NULL;
|
||||
}
|
||||
|
|
@ -159,7 +160,7 @@ PHP_METHOD(gnupg_keylistiterator,rewind){
|
|||
GNUPG_GET_ITERATOR();
|
||||
|
||||
if((intern->err = gpgme_op_keylist_start(intern->ctx, Z_STRVAL(intern->pattern), 0)) != GPG_ERR_NO_ERROR){
|
||||
zend_throw_exception(zend_exception_get_default(),gpg_strerror(intern->err),1 TSRMLS_CC);
|
||||
zend_throw_exception(zend_exception_get_default(TSRMLS_C),gpg_strerror(intern->err),1 TSRMLS_CC);
|
||||
}
|
||||
if((intern->err = gpgme_op_keylist_next(intern->ctx, &intern->gpgkey))!=GPG_ERR_NO_ERROR){
|
||||
RETURN_FALSE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue