Commit e6334845 authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie
Browse files

Fix problem where nigel might not exist when validating a form

parent 2a30deb6
......@@ -870,7 +870,7 @@ function pieform_validate(Pieform $form, $values) {
if (!isset($values['sesskey'])) {
throw new UserException('No session key');
if ($USER->get('sesskey') != $values['sesskey']) {
if ($USER && $USER->get('sesskey') != $values['sesskey']) {
throw new UserException('Invalid session key');
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment