ElasticEmail.WebApiClient-php icon indicating copy to clipboard operation
ElasticEmail.WebApiClient-php copied to clipboard

Error using example

Open koAndy opened this issue 5 years ago • 3 comments

Hy,

Just copy and paste the example described in readme.md and it gives me the following error:

PHP Catchable fatal error: Argument 1 passed to ElasticEmailClient\ApiConfiguration::setApiKey() must be an instance of ElasticEmailClient\string, string given

koAndy avatar Dec 16 '19 15:12 koAndy

btw, i think your examples are very outdated. For example, argument 10, 11, 12 cannot be null, must be array according to sending method definition.

koAndy avatar Dec 16 '19 15:12 koAndy

I am experiencing the same problem with the ElasticEmailClient\string @koAndy , let me know if you manage to solve it please. I will do the same.

carlocaprini avatar Feb 07 '20 10:02 carlocaprini

It seems I was using a too old version of PHP: while using PHP 7.1 the library is working correctly (including the example the documentation). @koAndy you should check you version and, in case, update it.

carlocaprini avatar Feb 07 '20 14:02 carlocaprini