Summary
When i run the following function:
function mailerliteAddEmail($email, $username) {
$mailerliteClient = new \MailerLite\MailerLite(['api_key' => "xxx"]);
$subscriberData = [
'email' => $email,
'fields' => [
'name' => $username
],
'groups' => [
113072541
]
];
try {
$apiResponse = $mailerliteClient->subscribers->create($subscriberData);
} catch (\Exception $exception) {
error_log("Errore Mailerlite: " . $exception->getMessage());
}
mailerliteAddEmailOld($email, $username);
}
I get the following error:
PHP Fatal error: Declaration of Http\\Client\\Curl\\Client::sendRequest(Psr\\Http\\Message\\RequestInterface $request) must be compatible with Psr\\Http\\Client\\ClientInterface::sendRequest(Psr\\Http\\Message\\RequestInterface $request): Psr\\Http\\Message\\ResponseInterface in /var/www/html/hydestore/mailerlite/php-http/curl-client/src/Client.php on line 111
Expected Results
The expected result is that the function works without errors.
Actual Results
Error printed.
Steps to Reproduce
- Install the latest version from composer
- Execute the example provided
Summary
When i run the following function:
I get the following error:
PHP Fatal error: Declaration of Http\\Client\\Curl\\Client::sendRequest(Psr\\Http\\Message\\RequestInterface $request) must be compatible with Psr\\Http\\Client\\ClientInterface::sendRequest(Psr\\Http\\Message\\RequestInterface $request): Psr\\Http\\Message\\ResponseInterface in /var/www/html/hydestore/mailerlite/php-http/curl-client/src/Client.php on line 111Expected Results
The expected result is that the function works without errors.
Actual Results
Error printed.
Steps to Reproduce