Closed TimothyLoyer closed 8 years ago
Quick example of the result:
protected $rules = [
'file_name' => 'trim',
'file_type' => 'trim',
'size' => '',
'mimetype' => 'trim',
];
Before sanitizer:
array (size=7)
'file_name' => string 'larger glasses' (length=14)
'file_type' => string 'gif' (length=3)
'size' => int 508339
'mimetype' => string 'image/gif' (length=9)
After sanitizer:
array (size=7)
'file_name' => string 'larger glasses' (length=14)
'file_type' => string 'gif' (length=3)
'size' =>
array (size=1)
0 => int 508339
'mimetype' => string 'image/gif' (length=9)
I'm not sure that this pull request would still work, but this is still a problem on the current version.
Fix issue where values without assigned sanitizer(s) would be returned back as an array by putting the value and parameters in $parameterSet, and making sure that $value only ever contains the original value or the returned, sanitized value.