From: Mikael Nordfeldth Date: Sat, 29 Apr 2017 12:48:46 +0000 (+0200) Subject: Confirm_address::getByAddress not getAddress X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c505652c15ad7fdc542b77313baf52cffa009f8f;p=quix0rs-gnu-social.git Confirm_address::getByAddress not getAddress Also fixed the error handling to match the function call. --- diff --git a/scripts/resend_confirm_address.php b/scripts/resend_confirm_address.php index 1e5bcc1555..b73246d6ef 100755 --- a/scripts/resend_confirm_address.php +++ b/scripts/resend_confirm_address.php @@ -33,9 +33,10 @@ $ca = null; if (have_option('e', 'email')) { $email = get_option_value('e', 'email'); - $ca = Confirm_address::getAddress($email, 'email'); - if (!$ca instanceof Confirm_address) { - print "Can't find email $email in confirm_address table.\n"; + try { + $ca = Confirm_address::getByAddress($email, 'email'); + } catch (NoResultException $e) { + print sprintf("Can't find %s address %s in %s table.\n", $e->obj->address_type, $e->obj->address, $e->obj->tableName()); exit(1); } } elseif (have_option('a', 'all')) {