Compare commits
2 Commits
0a7b1cdc12
...
5e9ad29f3c
Author | SHA1 | Date | |
---|---|---|---|
|
5e9ad29f3c | ||
|
1991122c32 |
@ -51,6 +51,8 @@ class FormContext implements FormContextInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->fillValues();
|
||||||
|
|
||||||
$this->files = $request->getUploadedFiles() ?: [];
|
$this->files = $request->getUploadedFiles() ?: [];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,4 +144,16 @@ class FormContext implements FormContextInterface
|
|||||||
{
|
{
|
||||||
$this->messages[] = $message;
|
$this->messages[] = $message;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
protected function fillValues() : void
|
||||||
|
{
|
||||||
|
# Skipping overrides of this particular class vars as a security measure
|
||||||
|
$skipping = array_keys(array_change_key_case(get_class_vars(FormContext::class), CASE_LOWER));
|
||||||
|
|
||||||
|
foreach($this->values as $property => $value) {
|
||||||
|
if ( ! in_array(strtolower($property), $skipping) && property_exists($this, $property)) {
|
||||||
|
$this->$property = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user