From d8be544deacbb3279a4116978f9e2fbdb569ba0a Mon Sep 17 00:00:00 2001 From: Jim Jagielski Date: Wed, 11 Feb 2015 17:51:41 +0000 Subject: [PATCH] Bug #65342 Add simple error reporting --- gnupg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gnupg.c b/gnupg.c index ef13908..e627369 100644 --- a/gnupg.c +++ b/gnupg.c @@ -1391,7 +1391,10 @@ PHP_FUNCTION(gnupg_import){ } gpgme_data_release(in); result = gpgme_op_import_result (intern->ctx); - + + if(result->imports->result != GPG_ERR_NO_ERROR){ + RETURN_FALSE(); + } array_init (return_value); add_assoc_long (return_value, "imported", result->imported); add_assoc_long (return_value, "unchanged", result->unchanged);