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

Zend incompatibility: http_response_code should work in CLI mode #1352

Closed
Majkl578 opened this issue Dec 14, 2013 · 2 comments
Closed

Zend incompatibility: http_response_code should work in CLI mode #1352

Majkl578 opened this issue Dec 14, 2013 · 2 comments

Comments

@Majkl578
Copy link
Contributor

PHP allows using http_response_code() in CLI mode without any error. HHVM raises a warning each time it is used and does not allow changing response code (always FALSE).

test.php:

var_dump(http_response_code());
http_response_code(295);
var_dump(http_response_code());

cli:

$ php test.php 
bool(false)
int(295)
$ hhvm test.php 
HipHop Warning: Unable to access response code, no transport in <path>/test.php on line X
bool(false)
HipHop Warning: Unable to access response code, no transport in <path>/test.php on line X
HipHop Warning: Unable to access response code, no transport in <path>/test.php on line X
bool(false)

$ hhvm --version
HipHop VM v2.3.0-dev (rel)
Compiler: heads/master-0-g050c081b0e7abdda2c03fdb97b7a4b8d92a409f8
Repo schema: 71f997a147ebe07bafbd50086dd4e61c509513c4

@scannell
Copy link
Contributor

@Majkl578, thanks for reporting this. Feel free to submit a PR if you (or anyone else reading this) gets to this before we do -- it looks like you're already working on a fix.

@Majkl578
Copy link
Contributor Author

@scannell: Unfortunately I am just fixing our PHP framework (most popular one in Czech Republic btw.) to work with HHVM's current state, my C++ knowledge is not as good to provide fixes directly for HHVM.

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

No branches or pull requests

2 participants