Skip to content

Commit ade1652

Browse files
committed
Merge pull request #406 from sjlangley/master
Always use Google_Io_Stream on App Engine
2 parents de78028 + f21a7f0 commit ade1652

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/Google/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function __construct($config = null)
8787
}
8888

8989
if ($config->getIoClass() == Google_Config::USE_AUTO_IO_SELECTION) {
90-
if (function_exists('curl_version') && function_exists('curl_exec')) {
90+
if (function_exists('curl_version') && function_exists('curl_exec') && !$this->isAppEngine()) {
9191
$config->setIoClass("Google_IO_Curl");
9292
} else {
9393
$config->setIoClass("Google_IO_Stream");

tests/general/ApiClientTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ public function testAppEngineAutoConfig()
131131
$_SERVER['SERVER_SOFTWARE'] = 'Google App Engine';
132132
$client = new Google_Client();
133133
$this->assertInstanceOf('Google_Cache_Memcache', $client->getCache());
134+
$this->assertInstanceOf('Google_Io_Stream', $client->getIo());
134135
unset($_SERVER['SERVER_SOFTWARE']);
135136
}
136137

0 commit comments

Comments
 (0)