From: ethem Date: Tue, 3 Oct 2006 18:21:14 +0000 (+0000) Subject: If an error occures, id returns 0. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c008cd2fcf4966d62f283e9b16150e1075804299;p=moodle.git If an error occures, id returns 0. The user, who will be sent email, may be confused for $record->id=0. Merged from 16stable. --- diff --git a/enrol/authorize/authorizenetlib.php b/enrol/authorize/authorizenetlib.php index a1b4c5f2e3..d3b83ab597 100644 --- a/enrol/authorize/authorizenetlib.php +++ b/enrol/authorize/authorizenetlib.php @@ -331,7 +331,7 @@ function authorize_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE, $ $extra->transid = $transid; $extra->settletime = authorize_getsettletime(time()); unset($extra->sum); // this is not used in refunds table. - if (! $extra->id = insert_record('enrol_authorize_refunds', $extra)) { + if (! insert_record('enrol_authorize_refunds', $extra)) { email_to_admin("Error while trying to insert data " . "into table enrol_authorize_refunds. Please add manually this record:", $extra); }