diff -urN ../google_contacts.orig/google_contacts.php ./google_contacts.php --- ../google_contacts.orig/google_contacts.php 2013-08-04 22:05:38.000000000 +0300 +++ ./google_contacts.php 2015-07-09 00:01:14.000000000 +0300 @@ -99,9 +99,16 @@ // perform login and set protocol version to 3.0 try { $client = Zend_Gdata_ClientLogin::getHttpClient( $this->user, $this->pass, 'cp'); +if (!$client) { + $this->error = "couldn't create google http client to get google contacts"; + write_log('google_contacts', $this->error); + if(method_exists($rcmail->output, 'show_message')) + $rcmail->output->show_message($this->error,'error'); +} else { $client->setHeaders('If-Match: *'); $this->gdata = new Zend_Gdata($client); $this->gdata->setMajorProtocolVersion(3); +} } catch (Exception $e) { $this->error = $e->getMessage(); write_log('google_contacts', $this->error);