File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ public function getAccessToken()
250250 // The response is json encoded, so could be the string null.
251251 // It is arguable whether this check should be here or lower
252252 // in the library.
253- return (null == $ token || 'null ' == $ token ) ? null : $ token ;
253+ return (null == $ token || 'null ' == $ token || ' [] ' == $ token ) ? null : $ token ;
254254 }
255255
256256 /**
Original file line number Diff line number Diff line change @@ -48,6 +48,12 @@ public function testPrepareInvalidScopes() {
4848 $ this ->assertEquals ("" , $ scopes );
4949 }
5050
51+ public function testNoAuthIsNull () {
52+ $ client = new Google_Client ();
53+
54+ $ this ->assertNull ($ client ->getAccessToken ());
55+ }
56+
5157 public function testPrepareService () {
5258 $ client = new Google_Client ();
5359 $ client ->setScopes (array ("scope1 " , "scope2 " ));
You can’t perform that action at this time.
0 commit comments