Thanks to visit codestin.com
Credit goes to github.com

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

Fix for #4727#4734

Closed
pauloelr wants to merge 7 commits into
zendframework:masterfrom
pauloelr:fix_filter_array_to_string
Closed

Fix for #4727#4734
pauloelr wants to merge 7 commits into
zendframework:masterfrom
pauloelr:fix_filter_array_to_string

Conversation

@pauloelr
Copy link
Copy Markdown
Contributor

Check if parameter is scalar before cast to string
If not throw InvalidArgumentException
Fix for #4727

pauloelr added 3 commits June 26, 2013 19:14
Check if parameter is scalar before cast to string
If not throw InvalidArgumentException
Fix for #4727
I always forget something about travis
@mwillbanks
Copy link
Copy Markdown
Contributor

@pauloelr please add in unit tests that show the desired exception being raised.

@mwillbanks
Copy link
Copy Markdown
Contributor

Also you should replace "string" with "scalar" in: '%s expects parameter to be string, "%s" given',

pauloelr added 4 commits June 26, 2013 21:20
Found one more.
Check array in:
Zend\Filter\BaseName
Zend\Filter\Digits
Zend\Filter\HtmlEntities
Zend\Filter\RealPath
@mwillbanks
Copy link
Copy Markdown
Contributor

@weierophinney since this technically could be a BC break should we target this at develop? More than likely it is not and just fixing a missing check for scalar values but figured I'd get your feedback :)

@ghost ghost assigned weierophinney Jun 28, 2013
weierophinney added a commit that referenced this pull request Jun 28, 2013
@weierophinney
Copy link
Copy Markdown
Member

@mwillbanks In each case, the filters were designed only to work with strings or integers/floats; these checks fix behavior issues when non-scalars. As such, I consider it a bugfix, and have merged.

@gag237 gag237 mentioned this pull request Jun 29, 2013
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
weierophinney added a commit to zendframework/zend-filter that referenced this pull request May 15, 2015
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.

3 participants