mirror of
https://github.com/php-gnupg/php-gnupg.git
synced 2024-11-22 06:27:08 +00:00
Fix and finish test for oo init with home dir
This commit is contained in:
parent
2f99f8696a
commit
60e13bec5a
2 changed files with 4 additions and 5 deletions
6
gnupg.c
6
gnupg.c
|
@ -162,7 +162,7 @@ static void php_gnupg_this_make(PHPC_THIS_DECLARE(gnupg), zval *options TSRMLS_D
|
|||
}
|
||||
if (options && PHPC_HASH_CSTR_FIND_IN_COND(
|
||||
Z_ARRVAL_P(options), "home_dir", ppv_home_dir)) {
|
||||
home_dir = PHPC_STRVAL_P(ppv_file_name);
|
||||
home_dir = PHPC_STRVAL_P(ppv_home_dir);
|
||||
}
|
||||
|
||||
if (file_name != NULL || home_dir != NULL) {
|
||||
|
@ -685,7 +685,7 @@ PHP_METHOD(gnupg, __construct)
|
|||
PHPC_THIS_DECLARE(gnupg);
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|a",
|
||||
options) == FAILURE) {
|
||||
&options) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -703,7 +703,7 @@ PHP_FUNCTION(gnupg_init)
|
|||
PHPC_THIS_DECLARE(gnupg);
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|a",
|
||||
options) == FAILURE) {
|
||||
&options) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@ $gpg->seterrormode(gnupg::ERROR_WARNING);
|
|||
$gpg->import($testkey);
|
||||
$imported = false;
|
||||
foreach (glob("$homedir/*") as $filename) {
|
||||
//var_dump($filename);
|
||||
$imported = true;
|
||||
}
|
||||
var_dump($imported);
|
||||
|
|
Loading…
Reference in a new issue