don't use uninitialized $valid_code
This commit is contained in:
parent
acfed2353c
commit
2a57bbaf84
|
@ -249,9 +249,9 @@ class QvitterPlugin extends Plugin {
|
|||
}
|
||||
|
||||
// if qvitter is opt-out, disable the default register page (if we don't have a valid invitation code)
|
||||
if(isset($_POST['code'])) {
|
||||
$valid_code = Invitation::getKV('code', $_POST['code']);
|
||||
}
|
||||
$valid_code = isset($_POST['code'])
|
||||
? Invitation::getKV('code', $_POST['code'])
|
||||
: null;
|
||||
if(self::settings('enabledbydefault') && empty($valid_code)) {
|
||||
$m->connect('main/register',
|
||||
array('action' => 'qvitter'));
|
||||
|
|
Loading…
Reference in New Issue
Block a user