-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error to update to PHP 7.2 #17
Comments
@bryglen, there is a way to solve this, did you prefer @Macbenach and me make a PR? |
this is a known issue on 7.2, as of now no support for 7.2 |
@bryglen dude, plz upgrade your composer.json at least 6.++, see reference https://github.com/sendgrid/sendgrid-php/releases, you library are to old, plz make the update. |
Hello @bryglen what you think about this snippet public function getHeadersJson() {
if ($this->getHeaders() == NULL) {
return "{}";
}
if (count($this->getHeaders()) <= 0) {
return "{}";
}
return json_encode($this->getHeaders(), JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP);
} Maybe exist some better code but it seems to solve the problem in php 7.2, i test it in PHP 7.2 and 7.0 |
@bryglen, help us |
please create PR |
Hello guys, |
When send email apperace this error after update my server to PHP 7.2
message: count(): Parameter must be an array or an object that implements Countable"
file: "/var/www/html/tfd_rh_api/vendor/sendgrid/sendgrid/lib/SendGrid/Email.php"
References:
yiisoft/yii#4167
Automattic/jetpack#8420
invoiceninja/invoiceninja#1767
The text was updated successfully, but these errors were encountered: