|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #65342 Lack of Error Reporting
Submitted: 2013-07-26 08:15 UTC Modified: 2015-02-11 18:40 UTC
From: w00ty at tormail dot org Assigned: jimjag (profile)
Status: Closed Package: gnupg (PECL)
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: w00ty at tormail dot org
New email:
PHP Version: OS:


 [2013-07-26 08:15 UTC] w00ty at tormail dot org
gnupg_import( and other functions, but it's especially annoying with gnupg_import ) do not divulge when, and why, they have failed as much as is needed.

Test script:

$gpg = new gnupg();
$res = $gpg->import("THISISNOTAKEY");

// Currently, this is the best way to check if the import succeeded. No info
//   about why it may have failed is provided directly.

if( $res['imported'] == $res['unchanged'] )
    die("Failed to import key - " . $gpg->geterror() );



diff (last revision 2013-07-26 08:17 UTC by w00ty at tormail dot org)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-07-26 08:17 UTC] w00ty at tormail dot org
Ignore the junk below the description, I must have been typing in the wrong window.
 [2015-02-11 17:49 UTC]
Thx for the patch... Made a minor change to explicitly check for GPG_ERR_NO_ERROR.
 [2015-02-11 17:51 UTC]
Automatic comment from SVN on behalf of jimjag
Log: Bug #65342
Add simple error reporting
 [2015-02-11 18:40 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: jimjag
 [2015-02-11 18:40 UTC]
Fixed in 1.3.6
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Jul 31 11:01:23 2021 UTC