daniel-zahariev / php-aws-ses

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

Triggering PHP Errors isn't optional #63

Open tornadotwins opened 5 years ago

tornadotwins commented 5 years ago

First of all, great class! Thanks! An issue I ran into:

In the release notes of v.0.8.5, it's said that "Triggering an error is now optional (on by default)".

Except, it's not. Most functions (getSendQuota(), getSendStatistics(), verifyEmailAddress(), etc) don't have a way to overwrite triggering errors, nor do these functions look at $this->__trigger_errors set by the constructor.

So, even if you turn triggering errors off in the constructor, most functions ignore it and trigger errors anyway.

The only function that lets us overwrite it is sendEmail().

This makes it difficult to check if the user has entered valid auth keys, without PHP going into fatal errors.