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

Fix for HHVm issue with stream_get_meta_data #223

Merged
merged 3 commits into from
Aug 5, 2014

Conversation

martinssipenko
Copy link
Contributor

This should fix issue when HHVM is used, since HHVM has different implemenation of tmpfile() facebook/hhvm#2336 that leads to returning empty uri key when stream_get_meta_data is used.

Warning: Filename cannot be empty in vendor/squizlabs/php_codesniffer/CodeSniffer/Reporting.php on line 237
array(10) {
  ["wrapper_type"]=>
  string(9) "plainfile"
  ["stream_type"]=>
  string(5) "STDIO"
  ["mode"]=>
  string(0) ""
  ["unread_bytes"]=>
  int(0)
  ["seekable"]=>
  bool(true)
  ["uri"]=>
  string(0) ""
  ["timed_out"]=>
  bool(false)
  ["blocked"]=>
  bool(true)
  ["eof"]=>
  bool(false)
  ["wrapper_data"]=>
  NULL
}

@goatherd
Copy link
Contributor

👍

@gsherwood gsherwood merged commit b6597dd into squizlabs:phpcs-fixer Aug 5, 2014
@gsherwood
Copy link
Member

Thanks for this fix. I didn't originally use sys_get_temp_dir() because it isn't available in my min PHP version, but I didn't realise it caused a HHVM issue. So instead, I've just put an extra function_exists() check in.

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.

None yet

3 participants