Bug in processor process schema – default values

Miellap
Member | 10
+
0
-

When setting default values in the schema and subsequently calling the process function from the processor, the default value is not only set if no value is specified, adding the default value to the beginning.

For example I have simplified structure and test cases, you can see code and results in image:

Marek Bartoš
Nette Blogger | 1177
+
+1
-

Call ->mergeDefaults(false) on the array schema.
Note: this feature was changed 3 months ago to not merge defaults by default, but is not yet part of a stable release

David Grudl
Nette Core | 8153
+
0
-

4 years ago :)

Miellap
Member | 10
+
0
-

Marek Bartoš wrote:

Call ->mergeDefaults(false) on the array schema.
Note: this feature was changed 3 months ago to not merge defaults by default, but is not yet part of a stable release

Thank you, I wasn't expecting something like that. I'll correct my code.