diff --git a/MPFormsFormManager.php b/MPFormsFormManager.php index 4cf66b2..206893a 100644 --- a/MPFormsFormManager.php +++ b/MPFormsFormManager.php @@ -570,12 +570,12 @@ public function validateField(FormFieldModel $formField, $step) if ($fakeValidation) { Input::setPost($formField->name, null); } - + // Special hack for upload fields because they delete $_FILES and thus // multiple validation calls will fail - sigh if ($widget instanceof \uploadable && isset($_SESSION['FILES'][$widget->name])) { $_FILES[$widget->name] = $_SESSION['FILES'][$widget->name]; - } + } return !$widget->hasErrors(); } @@ -780,6 +780,12 @@ private function createDummyForm() { $form = new stdClass(); $form->form = $this->formModel->id; + + // Set properties to avoid a warning "Undefined property: stdClass::$variable" + $form->headline = null; + $form->typePrefix = null; + $form->cssID = null; + return new Form($form); }