Permalink
Browse files

Don't show "Notice: Undefined property: paymentmethod"

  • Loading branch information...
1 parent e95b2c1 commit 6ce17f1ff0f28a91a171d9360d1eefe35f8c50cf ethem committed Sep 2, 2006
Showing with 2 additions and 3 deletions.
  1. +2 −3 enrol/authorize/enrol.php
@@ -133,15 +133,14 @@ function check_entry($form, $course)
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);
}

0 comments on commit 6ce17f1

Please sign in to comment.