File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ public function authenticate()
112112 );
113113 }
114114
115- if (strpos ( $ response ->headers [ 'Content-Type ' ], ' application/json ' ) !== false ) {
115+ if (in_array ( ' application/json ' , $ response ->getHeader ( 'Content-Type ' )) ) {
116116 $ token = array_merge (json_decode ($ response ->body , true ), ['created ' => time ()]);
117117 } else {
118118 parse_str ($ response ->body , $ token );
@@ -380,7 +380,7 @@ public function refreshToken($token = null)
380380 );
381381 }
382382
383- if (strpos ( $ response ->headers [ 'Content-Type ' ], ' application/json ' ) !== false ) {
383+ if (in_array ( ' application/json ' , $ response ->getHeader ( 'Content-Type ' )) ) {
384384 $ token = array_merge (json_decode ($ response ->body , true ), ['created ' => time ()]);
385385 } else {
386386 parse_str ($ response ->body , $ token );
You can’t perform that action at this time.
0 commit comments