mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #40246
[Bug 1636854] Re: Parse error: syntax error, unexpected ''login_submitted''
** Changed in: mahara/16.10
Status: Fix Committed => Fix Released
--
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 Released
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