From 6ce17f1ff0f28a91a171d9360d1eefe35f8c50cf Mon Sep 17 00:00:00 2001 From: ethem Date: Sat, 2 Sep 2006 13:42:28 +0000 Subject: [PATCH] Don't show "Notice: Undefined property: paymentmethod" --- enrol/authorize/enrol.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/enrol/authorize/enrol.php b/enrol/authorize/enrol.php index c96e4e840b..d45bc78743 100755 --- a/enrol/authorize/enrol.php +++ b/enrol/authorize/enrol.php @@ -133,15 +133,14 @@ class enrolment_plugin_authorize global $CFG; if (zero_cost($course) || - (!empty($course->password) and !empty($form->password))) { // MANUAL ENROLMENT + (!empty($course->password) and !empty($form->password))) { $manual = enrolment_factory::factory('manual'); $manual->check_entry($form, $course); if (!empty($manual->errormsg)) { $this->errormsg = $manual->errormsg; } } - else { // AUTHORIZE.NET ENROLMENT - if (in_array($form->paymentmethod, get_list_of_payment_methods())) { + elseif (!empty($form->paymentmethod) && in_array($form->paymentmethod, get_list_of_payment_methods())) { if ($form->paymentmethod == AN_METHOD_CC && validate_cc_form($form, $this->authorizeerrors)) { $this->cc_submit($form, $course); } -- 2.39.5