mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #39463
[Bug 1636854] A change has been merged
Reviewed: https://reviews.mahara.org/7222
Committed: https://git.mahara.org/mahara/mahara/commit/9eac27c1d61d18c6f2ec97c44bef87a65db3cdcb
Submitter: Robert Lyon (robertl@xxxxxxxxxxxxxxx)
Branch: 16.10_STABLE
commit 9eac27c1d61d18c6f2ec97c44bef87a65db3cdcb
Author: Robert Lyon <robertl@xxxxxxxxxxxxxxx>
Date: Thu Oct 27 08:33:03 2016 +1300
Bug 1636854: unexpected T_CONSTANT in login_validate()
Needed to be $values['login_submitted']
behatnotneeded
Change-Id: I1115c7cd90e7d28003c579004f4c7f9281000b4e
Signed-off-by: Robert Lyon <robertl@xxxxxxxxxxxxxxx>
(cherry picked from commit 173cb08db51aa8cf982f864e3d6c1c090bad958e)
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1636854
Title:
Parse error: syntax error, unexpected ''login_submitted''
Status in Mahara:
Fix Committed
Status in Mahara 16.10 series:
Fix Committed
Bug description:
Hi
I'm trying a clean install of Mahara 16.10.0 on a server running PHP
5.4 and I'm getting this error.
Parse error: syntax error, unexpected ''login_submitted''
(T_CONSTANT_ENCAPSED_STRING) in
/mnt/data1/www/m1610.edictdev.co.uk/httpdocs/auth/lib.php on line 1443
Looking at the code I think there might have been a copy and paste
error as you cannot check for empty('login_submitted'). My guess is
that it should be $values?
Function below.
Kevin
/**
* Called when the login form is being validated during submission.
* Checks the user and password fields are filled in.
*
* @param object $form The Pieform form object
* @param array $values The submitted values
*/
function login_validate(Pieform $form, $values) {
if (!empty('login_submitted')) {
if (empty($values['login_username']) || empty($values['login_password'])) {
$form->set_error(null, get_string('loginfailed'));
}
}
}
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1636854/+subscriptions
References