Question

I have a simple question about ZF2. Why when and send a post to another method my post data is changed. I mean :

<input name="auth.mode" type="text"/>
<input name="block.seconds" type="text" />

It suppose get :

array(2) {
  ["auth.mode"] => string(1) "A"
  ["block.seconds"] => string(0) "12"
}

But I get :

array(2) {
  ["auth_mode"] => string(1) "A"
  ["block_seconds"] => string(0) "12"
}

I do not need my keys changed. I need my keys as in the HTML form with this name. Help please.

Was it helpful?

Solution

PHP is making this change, not ZF. You can't have dots in the $_POST etc. array key names, so PHP automatically converts them to underscores.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top