facebook / hhvm

A virtual machine for executing programs written in Hack.
https://hhvm.com
Other
18.19k stars 3k forks source link

ZipArchive::getFromIndex: return a nullable string #9318

Closed jchaffraix-slack closed 1 year ago

jchaffraix-slack commented 1 year ago

This updates this function to return null instead of false on error. This allows typing the return as ?string instead of mixed.

Also fixed a return mismatch between builtins_zip.hhi and the extension that was reported by some Slack engineer.

facebook-github-bot commented 1 year ago

@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

jthemphill commented 1 year ago

This is great! We first need to update our internal WWW codebase to be forwards and backwards compatible with the type errors that this change exposes. I have a diff (D42806636) up to do that.

facebook-github-bot commented 1 year ago

@Wilfred merged this pull request in facebook/hhvm@8ac98e8a2149e01e3ef417fe54ab90f620ad3b86.