Skip to content

Commit 4149acd

Browse files
committed
Merge pull request googleapis#54 from ianbarber/master
Small tidy ups
2 parents 352daf6 + 6451450 commit 4149acd

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/Google/Client.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,11 @@ function_exists('date_default_timezone_set')) {
9090
} else if ( !($config instanceof Google_Config)) {
9191
$config = new Google_Config();
9292

93-
// Automatically use Memcache if we're in AppEngine.
9493
if ($this->isAppEngine()) {
94+
// Automatically use Memcache if we're in AppEngine.
9595
$config->setCacheClass('Google_Cache_Memcache');
96+
// Automatically disable compress.zlib, as currently unsupported.
97+
$config->setClassConfig('Google_Http_Request', 'disable_gzip', true);
9698
}
9799
}
98100

@@ -261,7 +263,7 @@ public function setState($state)
261263

262264
/**
263265
* @param string $accessType Possible values for access_type include:
264-
* {@code "offline"} to request offline access from the user. (This is the default value)
266+
* {@code "offline"} to request offline access from the user.
265267
* {@code "online"} to request online access from the user.
266268
*/
267269
public function setAccessType($accessType)

src/Google/Model.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ public function __get($key)
4646
$keyTypeName = $this->keyType($key);
4747
$keyDataType = $this->dataType($key);
4848
if (isset($this->$keyTypeName) && !isset($this->processed[$key])) {
49-
$val = $this->data[$key];
49+
if (isset($this->data[$key])) {
50+
$val = $this->data[$key];
51+
} else {
52+
$val = null;
53+
}
54+
5055
if ($this->isAssociativeArray($val)) {
5156
if (isset($this->$keyDataType) && 'map' == $this->$keyDataType) {
5257
foreach ($val as $arrayKey => $arrayItem) {

0 commit comments

Comments
 (0)