mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 15:05:42 +00:00
Minor fixes to the tests for 0.5.
This commit is contained in:
parent
9b24ace261
commit
7b64dc2391
@ -347,7 +347,7 @@ class UserDefinedForm_Controller extends Page_Controller {
|
||||
*/
|
||||
function Form() {
|
||||
$fields = $this->getFormFields();
|
||||
if(!$fields) return false;
|
||||
if(!$fields || !$fields->exists()) return false;
|
||||
|
||||
$actions = $this->getFormActions();
|
||||
|
||||
@ -411,7 +411,7 @@ class UserDefinedForm_Controller extends Page_Controller {
|
||||
|
||||
// set the values passed by the url to the field
|
||||
$request = $this->getRequest();
|
||||
if($var = $request->getVar($field->name)) {
|
||||
if(isset($request) && $var = $request->getVar($field->name)) {
|
||||
$field->value = Convert::raw2att($var);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user