From d9bc785b1b192ea072aa756b39bdde91c48be10d Mon Sep 17 00:00:00 2001 From: Gunter Grodotzki Date: Sun, 27 May 2018 01:23:05 +0200 Subject: [PATCH] revert order.. --- gnupg.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gnupg.c b/gnupg.c index 0336242..0b871ac 100644 --- a/gnupg.c +++ b/gnupg.c @@ -966,6 +966,10 @@ PHP_FUNCTION(gnupg_keyinfo) PHPC_VAL_MAKE(subkey); PHPC_ARRAY_INIT(PHPC_VAL_CAST_TO_PZVAL(subkey)); + if (gpgme_subkey->fpr) { + PHP_GNUPG_ARRAY_ADD_ASSOC_CSTR_EX(subkey, fingerprint, gpgme_subkey, fpr); + } + PHP_GNUPG_ARRAY_ADD_ASSOC_CSTR(subkey, keyid, gpgme_subkey); PHP_GNUPG_ARRAY_ADD_ASSOC_LONG(subkey, timestamp, gpgme_subkey); PHP_GNUPG_ARRAY_ADD_ASSOC_LONG(subkey, expires, gpgme_subkey); @@ -992,9 +996,6 @@ PHP_FUNCTION(gnupg_keyinfo) */ PHP_GNUPG_ARRAY_ADD_ASSOC_LONG(subkey, pubkey_algo, gpgme_subkey); PHP_GNUPG_ARRAY_ADD_ASSOC_LONG(subkey, length, gpgme_subkey); - if (gpgme_subkey->fpr) { - PHP_GNUPG_ARRAY_ADD_ASSOC_CSTR_EX(subkey, fingerprint, gpgme_subkey, fpr); - } #if GPGME_VERSION_NUMBER >= 0x010700 /* GPGME >= 1.7.0 */ if (gpgme_subkey->keygrip) { PHP_GNUPG_ARRAY_ADD_ASSOC_CSTR(subkey, keygrip, gpgme_subkey);