Selct box filled from global variable = bug?

Notice: This thread is very old.
Gruid
Member | 25
+
0
-

Nette Framework version 2.0.15 released on 2014–05–24

Hi, I have this array and selectbox:

array after dump:
array(4) {
   1 => "test1" (8)
   2 => "test2" (13)
   3 => "test3" (8)
   4 => "test3" (16)

Generated selectbox:
<select name="site" id="frmeditUserForm-site">
	<option value="1" selected="selected">test1</option>
	<option value="2">test2</option>
	<option value="3">test3</option>
	<option value="4">test4</option>
</select>

Case 1 – bug?:

  1. I define this array as global public variable
  2. I fill select box by this array
  3. Send form
  4. Value from selectbox is NULL.

Case 2 – all is ok:

  1. I define the same array variable in Form Component
  2. fill select box
  3. Send form
  4. Value from selectbox is OK

Some people saw this issue, but nobody find problem in my code. We conclude, that it could be a bug.