Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

fix #255 - Don't evaluate '0' as empty #257

Merged
merged 1 commit into from
Aug 17, 2017

Conversation

sasezaki
Copy link
Contributor

Psr-7 StreamInterface::read() returns only string, so don't need check it is empty-like value
fix #255

Psr-7 StreamInterface::read() returns only string, so don't need check it is empty-like value
$this->stream->getContents();
$this->assertStreamContents($this->stream->getContents());

$stream = new PhpInputStream('data://,0');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does data://,0 mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I intended just represent string(1) "0" for PHP's stream. ( http://php.net/wrappers.data )

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a very trivial data:// URL, without mime, charset or base64. (see RFC 2397, 3. syntax)
In this case, with just 0 as contents.

@weierophinney weierophinney added this to the 1.4.1 milestone Aug 17, 2017
@weierophinney weierophinney merged commit bee87b2 into zendframework:master Aug 17, 2017
weierophinney added a commit that referenced this pull request Aug 17, 2017
fix #255 - Don't evaluate '0' as empty
weierophinney added a commit that referenced this pull request Aug 17, 2017
weierophinney added a commit that referenced this pull request Aug 17, 2017
weierophinney added a commit that referenced this pull request Aug 17, 2017
@weierophinney
Copy link
Member

Thanks, @sasezaki

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

Successfully merging this pull request may close these issues.

PhpInputStream and '0' chunks
4 participants