Fixed gz decompress check for false #5754

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
@adam-ja
Contributor

adam-ja commented Jan 27, 2014

Previously if the decompressed value was, say, 0 an exception would be
thrown even though the decompression was successful. By making the check
for false strict the exception will still be thrown if there is an error
in the underlying PHP functions, while allowing us to return
decompressed values that would otherwise evaluate to false.

Fixed gz decompress check for false
Previously if the decompressed value was, say, 0 an exception would be
thrown even though the decompression was successful. By making the check
for false strict the exception will still be thrown if there is an error
    in the underlying PHP functions, while allowing us to return
    decompressed values that would otherwise evaluate to false.
@Maks3w

This comment has been minimized.

Show comment
Hide comment
@Maks3w

Maks3w Feb 15, 2014

Member

Please add a unit test

Member

Maks3w commented Feb 15, 2014

Please add a unit test

@weierophinney weierophinney added this to the 2.2.6 milestone Mar 3, 2014

@weierophinney

This comment has been minimized.

Show comment
Hide comment
@weierophinney

weierophinney Mar 3, 2014

Member

@Maks3w I'm actually not sure how to unit test this. Code is explicit and makes sense here. Marking for 2.2.6.

Member

weierophinney commented Mar 3, 2014

@Maks3w I'm actually not sure how to unit test this. Code is explicit and makes sense here. Marking for 2.2.6.

@adam-ja

This comment has been minimized.

Show comment
Hide comment
@adam-ja

adam-ja Mar 3, 2014

Contributor

Oops, was meaning to look back at this when I got chance. I looked at unit testing this when I first wrote it but current coverage isn't that fine grained and as @weierophinney says there's no obvious way of testing the change. Thanks :-)

Contributor

adam-ja commented Mar 3, 2014

Oops, was meaning to look back at this when I got chance. I looked at unit testing this when I first wrote it but current coverage isn't that fine grained and as @weierophinney says there's no obvious way of testing the change. Thanks :-)

@Maks3w

This comment has been minimized.

Show comment
Hide comment
@Maks3w

Maks3w Mar 3, 2014

Member

This kind of changes due the way of PHP interpret false values are for me very relevant for to be tested

Member

Maks3w commented Mar 3, 2014

This kind of changes due the way of PHP interpret false values are for me very relevant for to be tested

@weierophinney weierophinney self-assigned this Mar 3, 2014

weierophinney added a commit that referenced this pull request Mar 3, 2014

Merge pull request #5754 from adam-ja/hotfix/gz-decompress
Fixed gz decompress check for false

weierophinney added a commit that referenced this pull request Mar 3, 2014

weierophinney added a commit to zendframework/zend-filter that referenced this pull request May 15, 2015

Merge pull request zendframework/zendframework#5754 from adam-ja/hotf…
…ix/gz-decompress

Fixed gz decompress check for false

weierophinney added a commit to zendframework/zend-filter that referenced this pull request May 15, 2015

weierophinney added a commit to zendframework/zend-filter that referenced this pull request May 15, 2015

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