GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
I was getting lots of deflater warnings, this fixed it.
Updated deflater based on WordPress
Signed-off-by: Phill Sparks <email@example.com>
WordPress is GPL-licensed, so we can't use code from it. It needs to be written from scratch.
This was written from scratch; I was inspired by what I saw in WordPress' source. Please compare this with the http.php that I referenced (search for gzuncompress). I'm happy to recommit without mentioning WordPress if it makes you more comfortable about accepting the patch.
Ah, as long as it's from scratch, that's fine!
In terms of coding standards though, can you put the comparisons at the end, and use parentheses around assignment? i.e. if (false !== $decompressed = gzinflate($this->body)) should be if (($decompressed = gzinflate($this->body)) !== false)
if (false !== $decompressed = gzinflate($this->body))
if (($decompressed = gzinflate($this->body)) !== false)
Done and sent as a clean pull.