I've been using mailerlite for almost a year and couple weeks ago it stopped working, throwing this PHP error:
`Uncaught Error: Call to undefined function GuzzleHttp\Psr7\stream_for() in /home/www/clients/client3186/web7196/web/wp-content/themes/Heywood/functions/vendor/guzzlehttp/psr7/src/Request.php:54
Stack trace: #0 /home/www/clients/client3186/web7196/web/wp-content/themes/Heywood/functions/vendor/mailerlite/mailerlite-api-v2-php-sdk/src/Common/RestClient.php(96): GuzzleHttp\Psr7\Request->__construct('POST', Object(GuzzleHttp\Psr7\Uri), Array, '{"email":"test@...')
3 /home/www/clients/client3186/web7196/web/wp-content/themes/Heywood/functions/theme-users.php(133): MailerLiteAp in /home/www/clients/client3186/web7196/web/wp-content/themes/Heywood/functions/vendor/guzzlehttp/psr7/src/Request.php on line 54`
Hi,
I've been using mailerlite for almost a year and couple weeks ago it stopped working, throwing this PHP error: `Uncaught Error: Call to undefined function GuzzleHttp\Psr7\stream_for() in /home/www/clients/client3186/web7196/web/wp-content/themes/Heywood/functions/vendor/guzzlehttp/psr7/src/Request.php:54 Stack trace: #0 /home/www/clients/client3186/web7196/web/wp-content/themes/Heywood/functions/vendor/mailerlite/mailerlite-api-v2-php-sdk/src/Common/RestClient.php(96): GuzzleHttp\Psr7\Request->__construct('POST', Object(GuzzleHttp\Psr7\Uri), Array, '{"email":"test@...')
1 /home/www/clients/client3186/web7196/web/wp-content/themes/Heywood/functions/vendor/mailerlite/mailerlite-api-v2-php-sdk/src/Common/RestClient.php(56): MailerLiteApi\Common\RestClient->send('POST', 'groups/11111...', Array)
2 /home/www/clients/client3186/web7196/web/wp-content/themes/Heywood/functions/vendor/mailerlite/mailerlite-api-v2-php-sdk/src/Api/Groups.php(62): MailerLiteApi\Common\RestClient->post('groups/10301710...', Array)
3 /home/www/clients/client3186/web7196/web/wp-content/themes/Heywood/functions/theme-users.php(133): MailerLiteAp in /home/www/clients/client3186/web7196/web/wp-content/themes/Heywood/functions/vendor/guzzlehttp/psr7/src/Request.php on line 54`
Code I'm using:
require_once __DIR__ . '/vendor/autoload.php'; $groupId = 1111111111; groupsApi = (new MailerLiteApi\MailerLite("my-api-key"))->groups(); subscriber = ['email' => $user_email]; response = $groupsApi->addSubscriber($groupId, $subscriber);
I'm using v0.2.3 archive which is linked in the readme.md.
Please help.