php.net |  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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: w00ty at tormail dot org
New email:
PHP Version: OS:

 

 [2013-07-26 08:15 UTC] w00ty at tormail dot org
Description:
------------
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.
c4bd391926bec2778c5a1aebefb59c0a
c4bd391926bec2778c5a1aebefb5
c4bd391926bec2778c5a1aeb
c4bd391926bec277
c4bd391926bec2778c


Test script:
---------------
<?php

$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() );
}

?>


Patches

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

Pull Requests

History

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] jimjag@php.net
Thx for the patch... Made a minor change to explicitly check for GPG_ERR_NO_ERROR.
 [2015-02-11 17:51 UTC] jimjag@php.net
Automatic comment from SVN on behalf of jimjag
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=335916
Log: Bug #65342
Add simple error reporting
 [2015-02-11 18:40 UTC] jimjag@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: jimjag
 [2015-02-11 18:40 UTC] jimjag@php.net
Fixed in 1.3.6
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 19:01:37 2025 UTC