Skip to content

POST data overwrite persistent parameters. - #1061

Closed
pepakriz wants to merge 1 commit into
nette:masterfrom
pepakriz:patch-1
Closed

pepakriz wants to merge 1 commit into
nette:masterfrom
pepakriz:patch-1

Conversation

@pepakriz

Copy link
Copy Markdown
Contributor

These lines are redundant in my opinion. When I send data from AJAX form, I lost persistent data with the same name as form-input name.

These lines are redundant in my opinion. When I send data from AJAX form, I lost persistent data with the same name as form-input name.
@Majkl578

Copy link
Copy Markdown
Contributor

No, you do not. Provide test case.
Merging arrays with "+" doesn't work that way, it preserves keys and their values from the left-most array. Imho the only case is with parameters with default value which are not in $params.
Additionally, this is huge BC.

@pepakriz

Copy link
Copy Markdown
Contributor Author

Sorry, you are right. If current value is NULL (or default), it changes persistent parameter. But problem with rewriting value is still here. I don't understand the meaning of these lines. In which case can I use this 'feature'?

@JanTvrdik

Copy link
Copy Markdown
Contributor

👎 This would break almost every application using AJAX.

@dg

dg commented Apr 18, 2013

Copy link
Copy Markdown
Member

From my point of view, there is no difference between GET and POST AJAX request.

@dg
dg force-pushed the master branch 3 times, most recently from 991ba1a to e23de7a Compare August 26, 2014 15:04
dg added a commit to nette/application that referenced this pull request Apr 30, 2016
dg added a commit to nette/application that referenced this pull request Apr 30, 2016
dg added a commit to nette/application that referenced this pull request Apr 30, 2016
dg added a commit to nette/application that referenced this pull request May 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants