array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'tr', ), 'this' => array ( 0 => 'function.gnupg-geterrorinfo.php', 1 => 'gnupg_geterrorinfo', 2 => 'Returns the error info', ), 'up' => array ( 0 => 'ref.gnupg.php', 1 => 'GnuPG İşlevleri', ), 'prev' => array ( 0 => 'function.gnupg-geterror.php', 1 => 'gnupg_geterror', ), 'next' => array ( 0 => 'function.gnupg-getprotocol.php', 1 => 'gnupg_getprotocol', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/gnupg/functions/gnupg-geterrorinfo.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(PECL gnupg >= 1.5)
gnupg_geterrorinfo — Returns the error info
identifierGnupg tanıtıcısı, bir gnupg_init() çağrısından veya gnupg nesnesinden elde edilir.
Returns an array with error info.
Örnek 1 Procedural gnupg_geterrorinfo() example
<?php
$res = gnupg_init();
// this is called without any error
print_r(gnupg_geterrorinfo($res));
?>Yukarıdaki örneğin çıktısı:
array(4) {
["generic_message"]=>
bool(false)
["gpgme_code"]=>
int(0)
["gpgme_source"]=>
string(18) "Unspecified source"
["gpgme_message"]=>
string(7) "Success"
}
Örnek 2 OO gnupg_geterrorinfo() example
<?php
$gpg = new gnupg();
// error call
$gpg->decrypt('abc');
// error info should be displayed
print_r($gpg->geterrorinfo());
?>Yukarıdaki örneğin çıktısı:
array(4) {
["generic_message"]=>
string(14) "decrypt failed"
["gpgme_code"]=>
int(117440570)
["gpgme_source"]=>
string(5) "GPGME"
["gpgme_message"]=>
string(7) "No data"
}