Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading Issue from 5.1.4 to 5.4.0 in PHP 7.4: Problems with PUT Data Retrieval in application/x-www-form-urlencoded ContentType #16519

Closed
niden opened this issue Jan 28, 2024 Discussed in #16513 · 1 comment
Assignees
Labels
5.0 The issues we want to solve in the 5.0 release bug A bug report status: medium Medium

Comments

@niden
Copy link
Member

niden commented Jan 28, 2024

Discussed in https://github.com/orgs/phalcon/discussions/16513

Originally posted by baohanddd January 14, 2024
I encountered a problem after upgrading from 5.1.4 to 5.4.0 on PHP 7.4. I am unable to retrieve PUT data, which is always empty, but reverting back to version 5.1.4 resolves the issue. Currently, the project is using the ContentType application/x-www-form-urlencoded.

var_dump($_SERVER['HTTP_CONTENT_TYPE']);
var_dump($this->request->getPut());
exit;

The Result:

string(33) "application/x-www-form-urlencoded"
array(0) {
}

I looked into the code for both 5.1.4 and 5.4.0 and found the issue seems to be with the getPatchPut() function.

getPatchPut in 5.4.0:

getPatchPut in 5.4.0

I'm not sure if version 5.4.0 no longer supports application/x-www-form-urlencoded, or is there a way to make PUT work under x-www-form-urlencoded?

@niden niden self-assigned this Jan 28, 2024
@niden niden added bug A bug report status: medium Medium 5.0 The issues we want to solve in the 5.0 release labels Jan 28, 2024
@niden
Copy link
Member Author

niden commented Jan 29, 2024

This has been resolved in #16520

Thanks @sinbadxiii

@niden niden closed this as completed Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.0 The issues we want to solve in the 5.0 release bug A bug report status: medium Medium
Projects
Status: Released
Development

No branches or pull requests

1 participant