- Filling values of context if vars exists within it
This commit is contained in:
parent
1991122c32
commit
5e9ad29f3c
|
@ -147,10 +147,13 @@ class FormContext implements FormContextInterface
|
|||
|
||||
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 (property_exists($this, $property)) {
|
||||
if ( ! in_array(strtolower($property), $skipping) && property_exists($this, $property)) {
|
||||
$this->$property = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue