daniel-zahariev / php-aws-ses

PHP classes that interfaces Amazon Simple Email Service
307 stars 100 forks source link

Error into method SimpleEmailServiceRequest getParametersEncoded() #83

Open vborduja opened 3 years ago

vborduja commented 3 years ago

Generates wrong parameter encoded when present parameters with ARRAY values image

For example: parameter Identities = ['addr1', 'addr2'] Into result we have query: Identities=addr1&Identies=addr2 - WRONG Result must be with array definition: Identities[]=addr1&Identies[]=addr2

Why you don't use PHP native function http_build_query() $query = http_build_query($this->parameters);

vborduja commented 3 years ago

Seems like this method is not required any more, and could be replaced with http_build_query($this->parameters, '', '&', PHP_QUERY_RFC3986);

Made PR: https://github.com/daniel-zahariev/php-aws-ses/pull/84

daniel-zahariev commented 3 years ago

Hey @vborduja, thanks for the suggestion for using PHP's http_build_query function. My tests showed that AWS accepts only PHP_QUERY_RFC1738 encryption type. And i've pushed a new release (0.9.5) which should work for you.

vborduja commented 3 years ago

Thank you @daniel-zahariev, there was also my or with PHP_QUERY_RFC1738, but it's ok.