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

[#80] Ensure Uri::with*() methods validate #85

Closed
wants to merge 1 commit into from

Conversation

weierophinney
Copy link
Member

If methods should only accept a string, ensure they raise an exception in such cases.

This affects withFragment(), withScheme(), withUserInfo(), and withHost(), each of which were previously passing non-string input through without change, and, in some cases, raising errors as a result, while in other cases casting to string in unexpected ways.

Since PSR-7 documents these methods as only accepting strings, raising an InvalidArgumentException for non-string input is a reasonable and consistent approach.

Fixes #80.

If methods should only accept a string, ensure they raise an exception
in such cases.

Fixes zendframework#80.
@weierophinney weierophinney added this to the 1.1.3 milestone Aug 10, 2015
@weierophinney weierophinney self-assigned this Aug 10, 2015
weierophinney added a commit that referenced this pull request Aug 10, 2015
weierophinney added a commit that referenced this pull request Aug 10, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant