edamov / pushok

PHP client for Apple Push Notification Service (APNs) - Send push notifications to iOS using the new APNs HTTP/2 protocol with token-based (JWT with p8 private key)
MIT License
368 stars 119 forks source link

Error on PHP build with old cURL #104

Closed lescheyeled closed 1 year ago

lescheyeled commented 4 years ago

Issue #98 is still not fixed. With the fix in 0.11.1 the initial error of the undefined variable is fixed but now the following error occurs:

ErrorException: curl_multi_setopt(): Invalid curl multi configuration option in file /var/www/vhosts/eyeled.de/subdomains/apps2.eyeled.de/push/vendor/edamov/pushok/src/Client.php on line 102

In case of a not defined CURLMOPT_MAX_HOST_CONNECTIONS you shouldn't set the option. Something like:

if (defined('CURLMOPT_MAX_HOST_CONNECTIONS')) { curl_multi_setopt($this->curlMultiHandle, CURLMOPT_MAX_HOST_CONNECTIONS, $this->maxConcurrentConnections); }