Commit 1eaa3a59 authored by Bas de Nooijer's avatar Bas de Nooijer

the peclhttp adapter now checks the availability of peclhttp to prevent undefined method errors

parent e0845dcc
...@@ -46,6 +46,21 @@ ...@@ -46,6 +46,21 @@
*/ */
class Solarium_Client_Adapter_PeclHttp extends Solarium_Client_Adapter class Solarium_Client_Adapter_PeclHttp extends Solarium_Client_Adapter
{ {
/**
* Initialization hook
*
* Checks the availability of pecl_http
*/
protected function _init()
{
if (!function_exists('http_get')) {
throw new Solarium_Exception('Pecl_http is not available, install it to use the PeclHttp adapter');
}
parent::_init();
}
/** /**
* Execute a Solr request using the Pecl Http * Execute a Solr request using the Pecl Http
* *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment