From 7116749cb1ea0782fceacc9e17bc3dc26c3eb55d Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Mon, 21 May 2018 16:20:30 +0100 Subject: [PATCH] Fix invalid error check in this init --- gnupg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnupg.c b/gnupg.c index 610edb5..57f50e8 100644 --- a/gnupg.c +++ b/gnupg.c @@ -150,7 +150,7 @@ static void php_gnupg_this_init(PHPC_THIS_DECLARE(gnupg) TSRMLS_DC) /* {{{ php_gnupg_this_make */ static void php_gnupg_this_make(PHPC_THIS_DECLARE(gnupg), zval *options TSRMLS_DC) { - if (PHPC_THIS->err != GPG_ERR_NO_ERROR) { + if (PHPC_THIS->err == GPG_ERR_NO_ERROR) { char *file_name = GNUPG_PATH; char *home_dir = NULL; phpc_val *ppv_file_name, *ppv_home_dir;