8000 Fix for info() failing with the new HTTP API format. Added test. by SteveTherrien · Pull Request #65 · centrifugal/phpcent · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix for info() failing with the new HTTP API format. Added test. #65

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

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

SteveTherrien
Copy link
Contributor

Changes:

curl_setopt($ch, CURLOPT_POSTFIELDS, \json_encode($params));

to

curl_setopt($ch, CURLOPT_POSTFIELDS, \json_encode((object)$params));

so that an empty array gets encoded as {} instead of [], allowing parameter-less API calls (like info()) to produce a valid JSON payload.

Fixes #64

@FZambia FZambia merged commit 88747d2 into centrifugal:master Jun 27, 2024
2 checks passed
@FZambia
Copy link
Member
FZambia commented Jun 28, 2024

Thanks a lot @SteveTherrien !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

info() fails with the new HTTP API format
2 participants
0