|  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
28 - 2 = ?
Subscribe to this entry?

 [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: Mon Aug 02 00:01:24 2021 UTC