php-ga-measurement-protocol icon indicating copy to clipboard operation
php-ga-measurement-protocol copied to clipboard

PHP 7.2, Guzzle HTTP error: count(): Parameter must be an array or an object that implements Countable

Open oxygen opened this issue 5 years ago • 0 comments

In composer.json I have "theiconic/php-ga-measurement-protocol": "^2.7",

theiconic/php-ga-measurement-protocol uses a Guzzle version that's incompatible with PHP 7.2.

ErrorException: count(): Parameter must be an array or an object that implements Countable
/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php#67
#1 /vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(67): count(NULL)
#2 /vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(107): GuzzleHttp\Handler\CurlFactory->release(Object(GuzzleHttp\Handler\EasyHandle))
#3 /vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php(43): GuzzleHttp\Handler\CurlFactory::finish(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory))
#4 /vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(28): GuzzleHttp\Handler\CurlHandler->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#5 /vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(51): GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#6 /vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php(42): GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#7 /vendor/guzzlehttp/guzzle/src/Middleware.php(30): GuzzleHttp\PrepareBodyMiddleware->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#8 /vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php(68): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#9 /vendor/guzzlehttp/guzzle/src/Middleware.php(59): GuzzleHttp\RedirectMiddleware->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#10 /vendor/guzzlehttp/guzzle/src/HandlerStack.php(67): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#11 /vendor/guzzlehttp/guzzle/src/Client.php(275): GuzzleHttp\HandlerStack->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#12 /vendor/guzzlehttp/guzzle/src/Client.php(97): GuzzleHttp\Client->transfer(Object(GuzzleHttp\Psr7\Request), Array)
#13 /vendor/theiconic/php-ga-measurement-protocol/src/Network/HttpClient.php(101): GuzzleHttp\Client->sendAsync(Object(GuzzleHttp\Psr7\Request), Array)
#14 /vendor/theiconic/php-ga-measurement-protocol/src/Analytics.php(596): TheIconic\Tracking\GoogleAnalytics\Network\HttpClient->post('https:/ssl.goo...', Array)
#15 /vendor/theiconic/php-ga-measurement-protocol/src/Analytics.php(886): TheIconic\Tracking\GoogleAnalytics\Analytics->sendHit('sendEvent')

oxygen avatar Jan 18 '19 13:01 oxygen