Add simple error reporting
This commit is contained in:
Jim Jagielski 2015-02-11 17:51:41 +00:00
parent c2f35bc69a
commit d8be544dea

View file

@ -1391,7 +1391,10 @@ PHP_FUNCTION(gnupg_import){
} }
gpgme_data_release(in); gpgme_data_release(in);
result = gpgme_op_import_result (intern->ctx); result = gpgme_op_import_result (intern->ctx);
if(result->imports->result != GPG_ERR_NO_ERROR){
RETURN_FALSE();
}
array_init (return_value); array_init (return_value);
add_assoc_long (return_value, "imported", result->imported); add_assoc_long (return_value, "imported", result->imported);
add_assoc_long (return_value, "unchanged", result->unchanged); add_assoc_long (return_value, "unchanged", result->unchanged);